84% comment-genius

Code Review | Comment Genius

WordPress plugin Comment Genius scored84%from 54 tests.

About plugin

  • Plugin page: comment-genius
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Aug 17, 2016
  • Number of updates: 10
  • Update frequency: every 49.2 days
  • Top authors: butterflymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Comment Genius
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0439.96 ▼4.92
Dashboard /wp-admin3.37 ▲0.0349.43 ▲0.33
Posts /wp-admin/edit.php3.49 ▲0.0949.45 ▲0.82
Add New Post /wp-admin/post-new.php5.97 ▲0.0582.84 ▼17.53
Media Library /wp-admin/upload.php3.30 ▲0.0339.41 ▼0.38
Comment Genius /wp-admin/options-general.php?page=cgm3.3236.86

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 16 new options
New WordPress options
cg-opacity
cg-genius-height
cg-close
cg-genius-padding
cg-overlay-close
cg-genius-width
db_upgraded
widget_recent-comments
widget_theysaidso_widget
cg-enabled
...

Browser metrics Passed 4 tests

Comment Genius: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲25714.06 ▼0.6711.94 ▲9.8945.83 ▲1.55
Dashboard /wp-admin2,272 ▲955.87 ▲0.27100.39 ▲13.1843.96 ▲3.84
Posts /wp-admin/edit.php2,179 ▲792.36 ▲0.3641.16 ▼1.2836.19 ▼3.26
Add New Post /wp-admin/post-new.php1,573 ▲4723.18 ▼0.34680.16 ▼5.6037.40 ▼13.29
Media Library /wp-admin/upload.php1,477 ▲774.56 ▲0.4398.97 ▼15.5245.21 ▼10.22
Comment Genius /wp-admin/options-general.php?page=cgm9462.0828.0638.30

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 16 options
    • cg-close
    • cg-title
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • cg-genius-padding
    • cg-esc-close
    • cg-genius-height
    • cg-genius-width
    • db_upgraded
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/comment-genius/cgm.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/comment-genius/cgm-options.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/comment-genius/cgm.php on line 11

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: comment, popup

comment-genius/cgm.php 85% from 13 tests

The main file in "Comment Genius" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("comment-genius.php" instead of "cgm.php")
  • Description: The description should be shorter than 140 characters (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,082 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript320283816
PHP22816236
CSS141130

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/colorbox-master/images/controls.png1.59KB1.67KB0.00%