90% sqrd-apiscp-toolbox

Code Review | Toolbox for ApisCP

WordPress plugin Toolbox for ApisCP scored 90% from 54 tests.

About plugin

  • Plugin page: sqrd-apiscp-toolbox
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2021
  • Latest release: Mar 24, 2023
  • Number of updates: 4
  • Update frequency: every 121.3 days
  • Top authors: thundersquared (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 673 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Toolbox for ApisCP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.91 ▲0.77
Dashboard /wp-admin3.33 ▲0.0246.31 ▼1.57
Posts /wp-admin/edit.php3.38 ▲0.0243.65 ▼4.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.82 ▼0.90
Media Library /wp-admin/upload.php3.25 ▲0.0235.57 ▲3.05

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

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

Browser metrics Passed 4 tests

Toolbox for ApisCP: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.132.05 ▼0.4443.70 ▼5.38
Dashboard /wp-admin2,206 ▲185.91 ▼0.13105.33 ▼3.6643.33 ▲0.46
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0537.92 ▼3.3332.42 ▼3.87
Add New Post /wp-admin/post-new.php1,533 ▼023.59 ▲0.44670.41 ▲74.3459.12 ▲6.07
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0096.43 ▼5.8943.70 ▲0.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • 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)
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
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: apnscp, caching, pagespeed, optimize, compression...

sqrd-apiscp-toolbox/plugin.php 92% from 13 tests

"Toolbox for ApisCP" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sqrd-apiscp-toolbox.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin167 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23056167

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods1083.33%
▷ Protected methods18.33%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.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
No PNG files were detected