84% binaryimagemagick

Code Review | binaryImagemagick

WordPress plugin binaryImagemagick scored84%from 54 tests.

About plugin

  • Plugin page: binaryimagemagick
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Feb 5, 2015
  • Latest release: Feb 5, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: heiglandreas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.76ms] Passed 4 tests

Server-side resources used by binaryImagemagick
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.68 ▼4.62
Dashboard /wp-admin3.35 ▲0.0444.69 ▼6.73
Posts /wp-admin/edit.php3.40 ▲0.0445.08 ▲1.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.86 ▼13.06
Media Library /wp-admin/upload.php3.27 ▲0.0437.44 ▲4.12

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for binaryImagemagick
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.51 ▲0.131.77 ▲0.1037.71 ▼5.07
Dashboard /wp-admin2,195 ▲215.56 ▼0.0280.84 ▼5.8838.26 ▼2.28
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0234.81 ▲0.6833.82 ▼1.30
Add New Post /wp-admin/post-new.php1,529 ▲123.37 ▲0.27632.17 ▼54.0756.55 ▲2.97
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.0699.14 ▼14.0740.71 ▼5.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Warning
      require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/binaryimagemagick/Org_Heigl/BinaryImagemagick.php on line 34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: imagemagick, imagick, open_basedir

binaryimagemagick/binaryImagemagick.php 85% from 13 tests

"binaryImagemagick" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("binaryimagemagick.php" instead of "binaryImagemagick.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin220 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP279230213
Markdown1607

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1588.24%
▷ Protected methods211.76%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin