90% weightloss

Code Review | Weightloss

WordPress plugin Weightloss scored 90% from 54 tests.

About plugin

  • Plugin page: weightloss
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Apr 26, 2020
  • Number of updates: 8
  • Update frequency: every 101.5 days
  • Top authors: 2BlackBelts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Weightloss
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.33 ▼6.83
Dashboard /wp-admin3.31 ▲0.0043.98 ▼2.90
Posts /wp-admin/edit.php3.36 ▲0.0046.77 ▼2.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.46 ▼5.12
Media Library /wp-admin/upload.php3.23 ▲0.0032.81 ▼3.18

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Weightloss
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.521.63 ▼0.2140.51 ▼1.13
Dashboard /wp-admin2,206 ▲185.86 ▲0.84107.73 ▼0.1540.58 ▼0.40
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0240.33 ▼0.4734.87 ▼0.09
Add New Post /wp-admin/post-new.php1,534 ▼123.40 ▲0.05610.55 ▼63.2649.41 ▼8.18
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.0498.81 ▼3.2240.74 ▼3.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: weights, woocommerce, products

weightloss/weightloss.php Passed 13 tests

The main PHP script in "Weightloss" version 0.1 is automatically included on every request by WordPress
127 characters long description:
Checks for any Woocommerce products missing weights, which may cause postage calculators to malfunction upon customer checkout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1302151

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin