89% dropwp-disable-products

Code Review | Dropwp Disable Products

WordPress plugin Dropwp Disable Products scored89%from 54 tests.

About plugin

  • Plugin page: dropwp-disable-pr...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Oct 8, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dropwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /699 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.95ms] Passed 4 tests

An overview of server-side resources used by Dropwp Disable Products
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.05 ▼0.99
Dashboard /wp-admin3.31 ▲0.0048.84 ▲0.13
Posts /wp-admin/edit.php3.36 ▲0.0053.45 ▲6.21
Add New Post /wp-admin/post-new.php5.89 ▲0.00103.71 ▲15.95
Media Library /wp-admin/upload.php3.23 ▲0.0036.72 ▲2.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dropwp Disable Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.30 ▼0.091.94 ▼0.0244.45 ▼0.59
Dashboard /wp-admin2,195 ▲155.69 ▲0.0390.60 ▼3.7540.95 ▼3.67
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0539.49 ▼1.7635.11 ▲1.70
Add New Post /wp-admin/post-new.php1,526 ▼517.52 ▼6.07642.38 ▼51.5049.12 ▼11.54
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.0198.31 ▼9.7045.67 ▼2.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocomerce, products, disable, draft, helper

dropwp-disable-products/dropwp_disableproducts.php 85% from 13 tests

The primary PHP file in "Dropwp Disable Products" version 1.0.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dropwp-disable-products.php" instead of "dropwp_disableproducts.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
There were no executable files found in this plugin666 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
Markdown3670301
PHP54762201
CSS1110106
PO File119142658

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods13
▷ Static methods323.08%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
8 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/open.png0.86KB0.80KB▼ 6.92%
img/ir-a-manuales.png0.58KB0.57KB▼ 3.34%
img/dropwp.png0.98KB1.24KB0.00%
img/logo.png5.62KB3.61KB▼ 35.74%
img/abrir-ticket.png0.57KB0.43KB▼ 25.47%