90% senpex-on-demand-delivery

Code Review | Senpex On-Demand Delivery

WordPress plugin Senpex On-Demand Delivery scored90%from 54 tests.

About plugin

  • Plugin page: senpex-on-demand-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 4, 2020
  • Latest release: Jun 25, 2021
  • Number of updates: 20
  • Update frequency: every 17.9 days
  • Top authors: senpex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /444 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.07MB] [CPU: ▼6.21ms] Passed 4 tests

Server-side resources used by Senpex On-Demand Delivery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.24 ▲1.53
Dashboard /wp-admin3.39 ▲0.0445.50 ▼21.58
Posts /wp-admin/edit.php3.44 ▲0.0849.61 ▼2.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.85 ▼0.68
Media Library /wp-admin/upload.php3.31 ▲0.0837.88 ▼0.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Senpex On-Demand Delivery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.30 ▼0.021.87 ▲0.0237.87 ▼10.63
Dashboard /wp-admin2,195 ▲185.63 ▼0.0793.37 ▼5.7739.08 ▼8.51
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0640.04 ▼3.0635.60 ▲1.25
Add New Post /wp-admin/post-new.php1,545 ▼023.12 ▼0.03694.09 ▼33.8763.06 ▲2.90
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.04101.26 ▼3.6542.19 ▼1.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

senpex-on-demand-delivery/senpex-delivery-price.php 92% from 13 tests

The main PHP script in "Senpex On-Demand Delivery" version 1.0 is automatically included on every request by WordPress
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 ("senpex-on-demand-delivery.php" instead of "senpex-delivery-price.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,096 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP325936947
JavaScript1214149

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity54.00
▷ Minimum class complexity9.00
▷ Maximum class complexity79.00
Average method complexity5.30
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods3491.89%
▷ Protected methods00.00%
▷ Private methods38.11%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png4.95KB1.65KB▼ 66.66%