78% comment-images-reloaded

Code Review | Comment Images Reloaded

WordPress plugin Comment Images Reloaded scored78%from 54 tests.

About plugin

  • Plugin page: comment-images-re...
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 14, 2016
  • Latest release: Jun 23, 2016
  • Number of updates: 26
  • Update frequency: every 5.0 days
  • Top authors: wppuzzle (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /14,968 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.39ms] Passed 4 tests

Analyzing server-side resources used by Comment Images Reloaded
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1347.95 ▲6.29
Dashboard /wp-admin3.52 ▲0.2255.41 ▲1.13
Posts /wp-admin/edit.php3.64 ▲0.2852.70 ▼10.88
Add New Post /wp-admin/post-new.php6.13 ▲0.24100.21 ▼5.20
Media Library /wp-admin/upload.php3.45 ▲0.2237.82 ▲1.39
Comment Images Reloaded /wp-admin/options-general.php?page=comment_images_reloaded3.3934.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Comment Images Reloaded
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1514.28 ▼0.081.85 ▼0.1047.21 ▲5.00
Dashboard /wp-admin2,201 ▲275.54 ▼0.12100.88 ▲7.4746.85 ▲3.52
Posts /wp-admin/edit.php2,109 ▲62.00 ▼0.1237.00 ▼6.1434.36 ▼8.42
Add New Post /wp-admin/post-new.php6,253 ▲4,72526.05 ▲3.08935.99 ▲279.0362.03 ▲10.64
Media Library /wp-admin/upload.php1,403 ▲94.28 ▲0.10102.26 ▼7.0945.02 ▲1.17
Comment Images Reloaded /wp-admin/options-general.php?page=comment_images_reloaded9481.6925.1230.77

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=comment_images_reloaded
    • > Notice in wp-content/plugins/comment-images-reloaded/admin/options.php+202
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/comment-images-reloaded/class-comment-image-reloaded.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/comment-images-reloaded/class-comment-image-reloaded.php on line 4
    • > PHP Warning
      require_once(CIR_PLUGIN_PATH/class-comment-image-reloaded.php): failed to open stream: No such file or directory in wp-content/plugins/comment-images-reloaded/admin/options.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/media.php): failed to open stream: No such file or directory in wp-content/plugins/comment-images-reloaded/class-comment-image-reloaded.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'CIR_PLUGIN_PATH/class-comment-image-reloaded.php' (include_path='.:/usr/share/php') in wp-content/plugins/comment-images-reloaded/admin/options.php on line 3
    • > PHP Warning
      Use of undefined constant CIR_PLUGIN_PATH - assumed 'CIR_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/comment-images-reloaded/admin/options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/comment-images-reloaded/comment-image-reloaded.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: You can look at the official readme.txt

comment-images-reloaded/comment-image-reloaded.php 85% from 13 tests

The primary PHP file in "Comment Images Reloaded" version 2.2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("comment-images-reloaded.php" instead of "comment-image-reloaded.php")

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
Everything looks great! No dangerous files found in this plugin1,927 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP8463344934
PO File6323391829
JavaScript85216163
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.71
▷ Minimum class complexity9.00
▷ Maximum class complexity55.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods51
▷ Static methods2243.14%
▷ Public methods4384.31%
▷ Protected methods00.00%
▷ Private methods815.69%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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