94% checkbox

Code Review | Checkbox

WordPress plugin Checkbox scored 94% from 54 tests.

About plugin

  • Plugin page: checkbox
  • Plugin version: 0.8.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Oct 29, 2020
  • Latest release: Mar 30, 2022
  • Number of updates: 132
  • Update frequency: every 3.9 days
  • Top authors: shtirliz (93.18%)bandido (7.58%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 1,671 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.28MB] [CPU: ▼295.83ms] Passed 4 tests

A check of server-side resources used by Checkbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3372.85 ▲4.62
Dashboard /wp-admin3.69 ▲0.2841.07 ▼3.46
Posts /wp-admin/edit.php3.91 ▲0.2643.35 ▼9.91
Add New Post /wp-admin/post-new.php7.21 ▲0.24121.80 ▼1,174.55
Media Library /wp-admin/upload.php3.62 ▲0.3357.46 ▲23.59

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Checkbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,902 ▲14816.03 ▲0.419.62 ▼1.173.50 ▼0.39
Dashboard /wp-admin3,008 ▲1256.50 ▲0.13191.12 ▼10.26259.82 ▲50.98
Posts /wp-admin/edit.php2,691 ▲183.43 ▲0.0078.32 ▼5.88171.65 ▼11.40
Add New Post /wp-admin/post-new.php1,635 ▼016.84 ▲0.58708.44 ▲58.99192.35 ▼17.60
Media Library /wp-admin/upload.php1,692 ▼35.74 ▲0.02215.93 ▲30.90298.21 ▲42.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/checkbox/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/checkbox/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/checkbox/vendor/psr/log/Psr/Log/Test/TestLogger.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/checkbox/vendor/katzgrau/klogger/src/Logger.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/checkbox/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/checkbox/vendor/katzgrau/klogger/tests/LoggerTest.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: checkbox, woocommerce

checkbox/checkbox.php 92% from 13 tests

The main PHP file in "Checkbox" ver. 0.8.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,009 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP285001,1372,304
Markdown31370335
JSON300172
SVG201131
JavaScript22126
CSS351923
XML10018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.85
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces2
Traits2
Classes16
▷ Abstract classes212.50%
▷ Concrete classes1487.50%
▷ Final classes00.00%
Methods128
▷ Static methods1914.84%
▷ Public methods11992.97%
▷ Protected methods32.34%
▷ Private methods64.69%
Functions26
▷ Named functions2180.77%
▷ Anonymous functions519.23%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
assets/img/chosen-sprite.png0.53KB0.88KB0.00%
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/img/chosen-sprite@2x.png0.72KB0.83KB0.00%