83% compare-ninja-comparison-tables

Code Review | Compare Ninja: Create Professional Comparison Tables and Easily Add Them to Your Website

WordPress plugin Compare Ninja: Create Professional Comparison Tables and Easily Add Them to Your Website scored83%from 54 tests.

About plugin

  • Plugin page: compare-ninja-com...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2014
  • Latest release: May 12, 2020
  • Number of updates: 7
  • Update frequency: every 295.6 days
  • Top authors: CommonNinja (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /7,517 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Compare Ninja: Create Professional Comparison Tables and Easily Add Them to Your Website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.25 ▲0.87
Dashboard /wp-admin3.31 ▼0.0450.96 ▼15.67
Posts /wp-admin/edit.php3.36 ▲0.0046.34 ▼7.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.14 ▼17.39
Media Library /wp-admin/upload.php3.23 ▲0.0038.03 ▲3.91

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Compare Ninja: Create Professional Comparison Tables and Easily Add Them to Your Website: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.051.62 ▼0.2442.39 ▼0.46
Dashboard /wp-admin2,195 ▲245.65 ▲0.0796.23 ▲0.7143.69 ▲2.10
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0034.13 ▼9.0436.76 ▼1.42
Add New Post /wp-admin/post-new.php1,531 ▲223.28 ▲0.10668.14 ▼6.6462.10 ▼30.61
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0595.30 ▼12.8244.05 ▼1.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/compare-ninja-comparison-tables/compareninja.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please a description for screenshot #5 in compare-ninja-comparison-tables/assets to your readme.txt
Please take inspiration from this readme.txt

compare-ninja-comparison-tables/compareninja.php 85% from 13 tests

"Compare Ninja: Create Professional Comparison Tables and Easily Add Them to Your Website" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("compare-ninja-comparison-tables.php" instead of "compareninja.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

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
There were no executable files found in this plugin47 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10029
PHP161518

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/compareninja.png3.39KB0.93KB▼ 72.44%