83% tapuz-delivery

Code Review | Tapuz Delivery

WordPress plugin Tapuz Delivery scored 83% from 54 tests.

About plugin

  • Plugin page: tapuz-delivery
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 5.8.1
  • First release: Apr 6, 2016
  • Latest release: Jun 6, 2016
  • Number of updates: 38
  • Update frequency: every 1.6 days
  • Top authors: hatammy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Tapuz Delivery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1433.72 ▲9.17
Dashboard /wp-admin3.08 ▲0.0346.20 ▲1.80
Posts /wp-admin/edit.php3.14 ▲0.0338.54 ▼3.42
Add New Post /wp-admin/post-new.php5.45 ▲0.0289.89 ▼548.51
Media Library /wp-admin/upload.php3.03 ▲0.0232.80 ▼8.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 1 new option
New WordPress options
tapuz_install_date

Browser metrics Passed 4 tests

Tapuz Delivery: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.88 ▲0.476.02 ▼2.2241.64 ▼9.04
Dashboard /wp-admin2,983 ▲525.88 ▼0.07140.85 ▼1.72115.98 ▼10.79
Posts /wp-admin/edit.php2,751 ▲122.70 ▲0.0266.86 ▼1.1889.37 ▼2.15
Add New Post /wp-admin/post-new.php1,610 ▼6218.91 ▲0.04373.41 ▲1.58110.44 ▼1.11
Media Library /wp-admin/upload.php1,817 ▲105.02 ▲0.02159.73 ▲12.21124.44 ▼9.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • tapuz_install_date

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/tapuz-delivery/vendors/TCPDF/tcpdf.php on line 17778
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/tapuz-delivery/vendors/TCPDF/tcpdf.php on line 17778
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/tapuz-delivery/vendors/TCPDF/tcpdf.php on line 17778

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

readme.txt 88% from 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
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === tapuz-delivery === )
  • Screenshots: Add images for these screenshots: #1 (Open delivery), #2 (Delivery status)
You can take inspiration from this readme.txt

tapuz-delivery/tapuz-delivery.php Passed 13 tests

The main PHP file in "Tapuz Delivery" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
59 characters long description:
A plugin for Tapuz Delivery orders from within WooCommerce.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin47,204 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,52211,57146,651
JavaScript1620204
PO File17583186
CSS2140123
JSON10040

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,349)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 499)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity340.89
▷ Minimum class complexity1.00
▷ Maximum class complexity4,349.00
Average method complexity9.88
▷ Minimum method complexity1.00
▷ Maximum method complexity499.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods727
▷ Static methods10714.72%
▷ Public methods44561.21%
▷ Protected methods27637.96%
▷ Private methods60.83%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants85
▷ Global constants85100.00%
▷ Class constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/hatammy_logo.png10.02KB4.16KB▼ 58.47%