89% delivery-area-free-for-woocommerce

Code Review | Delivery Area

WordPress plugin Delivery Area scored89%from 54 tests.

About plugin

  • Plugin page: delivery-area-fre...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Nov 18, 2021
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: arnaudpf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼14.90ms] Passed 4 tests

Analyzing server-side resources used by Delivery Area
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0128.12 ▼23.40
Dashboard /wp-admin3.38 ▲0.0851.88 ▼12.02
Posts /wp-admin/edit.php3.50 ▲0.1453.76 ▲1.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0791.33 ▼22.63
Media Library /wp-admin/upload.php3.31 ▲0.0742.04 ▼1.55

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

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

Browser metrics Passed 4 tests

Delivery Area: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,477 ▼28414.31 ▲0.060.60 ▼1.1220.33 ▼24.71
Dashboard /wp-admin2,218 ▲415.48 ▼0.1887.55 ▼7.5842.57 ▲1.05
Posts /wp-admin/edit.php2,123 ▲231.97 ▲0.0338.83 ▼0.2330.99 ▼6.29
Add New Post /wp-admin/post-new.php1,546 ▲2023.27 ▼0.30673.07 ▼23.2163.59 ▲3.00
Media Library /wp-admin/upload.php1,423 ▲234.22 ▲0.0296.04 ▼3.3244.46 ▼3.36

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
You can look at the official readme.txt

delivery-area-free-for-woocommerce/delivery-area-free-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Delivery Area" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7" instead of "5.6")

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
No dangerous file extensions were detected2,271 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS214539807
JavaScript210932640
SVG534500
PHP6118186324

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
admin/assets/pin_blue.png2.43KB1.45KB▼ 40.51%