78% common-ninja-info-labels-for-woocommerce

Code Review | Common Ninja: Info Labels for WooCommerce

WordPress plugin Common Ninja: Info Labels for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: common-ninja-info...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.0
  • WordPress version: 6.3.1
  • First release: Jul 20, 2022
  • Latest release: Jul 20, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: CommonNinja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.47ms] Passed 4 tests

An overview of server-side resources used by Common Ninja: Info Labels for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0540.56 ▼0.89
Dashboard /wp-admin3.40 ▲0.0553.61 ▼1.83
Posts /wp-admin/edit.php3.51 ▲0.1150.55 ▼3.74
Add New Post /wp-admin/post-new.php5.98 ▲0.0594.33 ▲0.66
Media Library /wp-admin/upload.php3.32 ▲0.0539.34 ▲0.58
Info Labels /wp-admin/admin.php?page=common-ninja-info-labels-for-woocommerce3.2833.06

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Common Ninja: Info Labels for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.73 ▲0.011.97 ▲0.0740.07 ▼10.65
Dashboard /wp-admin2,218 ▲415.49 ▼0.1183.78 ▼4.1239.42 ▼2.44
Posts /wp-admin/edit.php2,126 ▲292.04 ▲0.0441.21 ▲1.8435.39 ▼1.00
Add New Post /wp-admin/post-new.php1,549 ▲2323.14 ▼0.01642.56 ▼1.5747.49 ▼5.73
Media Library /wp-admin/upload.php1,426 ▲234.14 ▲0.05107.51 ▲1.7344.28 ▲1.48
Info Labels /wp-admin/admin.php?page=common-ninja-info-labels-for-woocommerce8151.9923.9127.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/common-ninja-info-labels-for-woocommerce/commonninja/commonninja.init.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/common-ninja-info-labels-for-woocommerce/common-ninja-info-labels-for-woocommerce.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: photos editor, woocommerce, info labels, labels, tooltips...

common-ninja-info-labels-for-woocommerce/common-ninja-info-labels-for-woocommerce.php 77% from 13 tests

"Common Ninja: Info Labels for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "5.2")
  • Domain Path: The domain path should use only dashes and lowercase characters ("")
  • Domain Path: The domain path must begin with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin218 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33729158
CSS25060

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.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
_inc/commonninja.png2.92KB1.62KB▼ 44.44%