89% woocommerce-book-keeper

Code Review | Woocommerce Book Keeper

WordPress plugin Woocommerce Book Keeper scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-book-...
  • Plugin version: 1.08
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.3.2
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: Feb 7, 2021
  • Number of updates: 34
  • Update frequency: every 61.2 days
  • Top authors: Podd63 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /6,237 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.75ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Book Keeper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.85 ▲1.47
Dashboard /wp-admin3.32 ▲0.0247.62 ▲0.03
Posts /wp-admin/edit.php3.37 ▲0.0246.46 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.24 ▼10.26
Media Library /wp-admin/upload.php3.25 ▲0.0239.41 ▲3.76

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Book Keeper
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.71 ▲0.361.78 ▲0.1448.77 ▲9.53
Dashboard /wp-admin2,195 ▲205.51 ▼0.2183.88 ▼20.6636.65 ▼4.77
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0037.19 ▲1.5632.21 ▼6.75
Add New Post /wp-admin/post-new.php1,526 ▼15423.14 ▲1.40612.03 ▲5.1381.02 ▲15.48
Media Library /wp-admin/upload.php1,400 ▲64.22 ▲0.0296.55 ▼2.5844.16 ▲1.72

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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 smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

woocommerce-book-keeper/mw-book-keeper.php 77% from 13 tests

Analyzing the main PHP file in "Woocommerce Book Keeper" version 1.08
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-book-keeper.php" instead of "mw-book-keeper.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.8" instead of "3.6.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin731 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP612460611
PO File14545120

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/expert/wbk-expert-3.png12.79KB12.55KB▼ 1.86%
img/expert/wbk-expert-2.png12.70KB12.60KB▼ 0.78%
img/expert/wbk-expert-1.png15.22KB14.71KB▼ 3.34%
img/stars.png0.68KB0.49KB▼ 28.24%