78% resize-editor

Code Review | Resize Editor

WordPress plugin Resize Editor scored 78% from 54 tests.

About plugin

  • Plugin page: resize-editor
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.4-4.2.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2013
  • Latest release: Aug 13, 2015
  • Number of updates: 18
  • Update frequency: every 46.6 days
  • Top authors: s-hiroshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,472 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 gracefully, with no errors

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

This is a short check of server-side resources used by Resize Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.89 ▼0.72
Dashboard /wp-admin3.31 ▲0.0157.10 ▲10.77
Posts /wp-admin/edit.php3.36 ▲0.0146.57 ▼9.44
Add New Post /wp-admin/post-new.php5.89 ▲0.01100.06 ▼26.13
Media Library /wp-admin/upload.php3.23 ▲0.0134.95 ▼5.15
Resize Editor /wp-admin/options-general.php?page=resize-editor3.2029.95

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Resize Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.22 ▼0.951.75 ▼0.4047.35 ▲5.84
Dashboard /wp-admin2,212 ▲264.87 ▼0.08127.35 ▲12.0148.76 ▲4.32
Posts /wp-admin/edit.php2,098 ▲62.14 ▲0.1439.08 ▼2.9435.28 ▼0.96
Add New Post /wp-admin/post-new.php1,533 ▼023.25 ▲0.06660.19 ▲8.4060.69 ▲2.37
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0596.56 ▼4.2040.93 ▼7.53
Resize Editor /wp-admin/options-general.php?page=resize-editor7822.0324.1725.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resize-editor/resize-editor.php:43

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=resize-editor
    • > Network (severe)
    wp-content/plugins/resize-editor/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (set editor width), #2 (resize post editor width)
  • Plugin Name: Please specify the plugin name on the first line ( === resize-editor === )
The official readme.txt is a good inspiration

resize-editor/resize-editor.php Passed 13 tests

The primary PHP file in "Resize Editor" version 1.1.0 is used by WordPress to initiate all plugin functionality
25 characters long description:
Resize post editor width.

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
Good job! No executable or dangerous file extensions detected115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1136091
PO File14424

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.89KB5.06KB▼ 76.87%
screenshot-2.png30.29KB8.08KB▼ 73.32%