83% best-selling-in-category

Code Review | Best Selling in Category Woo

WordPress plugin Best Selling in Category Woo scored83%from 54 tests.

About plugin

  • Plugin page: best-selling-in-c...
  • Plugin version: 1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 7, 2022
  • Latest release: Aug 13, 2022
  • Number of updates: 5
  • Update frequency: every 7.4 days
  • Top authors: Musilda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Best Selling in Category Woo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0328.68 ▼18.78
Dashboard /wp-admin3.38 ▲0.0756.13 ▲3.39
Posts /wp-admin/edit.php3.49 ▲0.1349.89 ▲0.69
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.00 ▼5.49
Media Library /wp-admin/upload.php3.30 ▲0.0737.47 ▼0.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Best Selling in Category Woo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼30714.65 ▲0.300.54 ▼1.1519.84 ▼22.80
Dashboard /wp-admin2,195 ▲185.64 ▲0.0692.12 ▼10.2639.63 ▼3.40
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0636.89 ▼0.0533.15 ▼6.72
Add New Post /wp-admin/post-new.php1,526 ▲121.06 ▼2.69665.64 ▲6.1071.38 ▲11.51
Media Library /wp-admin/upload.php1,397 ▼04.25 ▲0.01101.47 ▼6.5146.18 ▼0.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Good news, no errors were detected

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/best-selling-in-category/admin/view.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: You can take inspiration from this readme.txt

best-selling-in-category/best-selling-in-category-woo.php 77% from 13 tests

"Best Selling in Category Woo" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("best-selling-in-category.php" instead of "best-selling-in-category-woo.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5.0" instead of "5.8")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin897 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS2185439
PHP6163263339
JavaScript216479
PO File1121240

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.50
▷ Minimum class complexity10.00
▷ Maximum class complexity21.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods731.82%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin