10% pixabay-images

Code Review | Pixabay Images

WordPress plugin Pixabay Images scored 10% from 54 tests.

About plugin

  • Plugin page: pixabay-images
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.6
  • WordPress version: 5.8.1
  • First release: Apr 11, 2013
  • Latest release: May 27, 2018
  • Number of updates: 47
  • Update frequency: every 39.8 days
  • Top authors: SimonStone (74.47%)byrev (27.66%)

Code review

54 tests

User reviews

26 reviews

Install metrics

30,000+ active / 266,643 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/pixabay-images/pixabay-images.php+34
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.80MB] [CPU: ▼190.98ms] Passed 4 tests

A check of server-side resources used by Pixabay Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼1.016.11 ▼29.70
Dashboard /wp-admin1.85 ▼1.216.96 ▼40.38
Posts /wp-admin/edit.php1.85 ▼1.265.86 ▼39.40
Add New Post /wp-admin/post-new.php1.85 ▼3.596.20 ▼654.44
Media Library /wp-admin/upload.php1.85 ▼1.169.36 ▼28.61
Pixabay Images /wp-admin/options-general.php?page=pixabay_images_settings1.856.38

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pixabay Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10216.17 ▲0.677.17 ▼1.6145.22 ▼7.27
Dashboard /wp-admin2,994 ▲605.98 ▲0.03149.86 ▼17.50113.86 ▼12.54
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0070.89 ▼2.3690.67 ▼5.11
Add New Post /wp-admin/post-new.php1,503 ▼18018.40 ▼0.06368.15 ▼27.45111.31 ▲0.38
Media Library /wp-admin/upload.php1,812 ▲25.01 ▼0.01154.30 ▲0.14125.94 ▲1.42
Pixabay Images /wp-admin/options-general.php?page=pixabay_images_settings1,2222.2159.44100.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/pixabay-images/pixabay-images.php+34
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pixabay_images_settings
    • > Notice in wp-content/plugins/pixabay-images/settings.php+44
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pixabay-images/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pixabay-images/pixabay-images.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt is a good inspiration

pixabay-images/pixabay-images.php Passed 13 tests

The main file in "Pixabay Images" v. 3.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
83 characters long description:
Find quality public domain images from Pixabay and upload them with just one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin388 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP25224253
PO File3510117
SVG20018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/favicon.png0.22KB0.30KB0.00%
img/search.png0.37KB0.38KB0.00%
img/settings.png0.25KB0.30KB0.00%
img/logo.png7.03KB7.12KB0.00%