84% gmagick

Code Review | Gmagick

WordPress plugin Gmagick scored84%from 54 tests.

About plugin

  • Plugin page: gmagick
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2012
  • Latest release: Sep 4, 2014
  • Number of updates: 13
  • Update frequency: every 77.6 days
  • Top authors: markoheijnen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,473 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.14ms] Passed 4 tests

An overview of server-side resources used by Gmagick
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.83 ▼6.27
Dashboard /wp-admin3.31 ▲0.0147.63 ▼12.17
Posts /wp-admin/edit.php3.36 ▲0.0053.24 ▼0.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.98 ▼4.86
Media Library /wp-admin/upload.php3.27 ▲0.0435.88 ▼1.27

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Gmagick
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.26 ▼0.271.95 ▲0.2145.83 ▲3.03
Dashboard /wp-admin2,192 ▲155.51 ▼0.1981.90 ▼10.3038.06 ▼5.44
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0135.41 ▼5.4930.43 ▼6.10
Add New Post /wp-admin/post-new.php1,531 ▲522.99 ▼0.04629.59 ▼54.5768.02 ▲10.99
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.04102.33 ▼0.8843.84 ▼5.12

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor' not found in wp-content/plugins/gmagick/editors/gmagick.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gmagick/gmagick.php:21

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
1 plugin tags: image

gmagick/gmagick.php Passed 13 tests

The entry point to "Gmagick" version 1.3 is a PHP file that has certain tags in its header comment area
28 characters long description:
Enables Gmagick in WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin242 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP273163242

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity4.57
▷ Minimum method complexity2.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin