84% afterwork-delivery

Code Review | AfterWork Delivery

WordPress plugin AfterWork Delivery scored84%from 54 tests.

About plugin

  • Plugin page: afterwork-delivery
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Mar 1, 2017
  • Number of updates: 18
  • Update frequency: every 6.9 days
  • Top authors: afterworkdelivery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.72ms] Passed 4 tests

This is a short check of server-side resources used by AfterWork Delivery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.97 ▲0.91
Dashboard /wp-admin3.31 ▲0.0058.57 ▲3.51
Posts /wp-admin/edit.php3.36 ▲0.0059.72 ▲6.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.23 ▼7.94
Media Library /wp-admin/upload.php3.23 ▲0.0037.38 ▼3.34

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by AfterWork Delivery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.61 ▼0.1245.00 ▼0.10
Dashboard /wp-admin2,192 ▲215.57 ▲0.0691.08 ▼13.3341.90 ▼7.16
Posts /wp-admin/edit.php2,103 ▲241.98 ▼0.0541.71 ▲4.5437.79 ▲2.64
Add New Post /wp-admin/post-new.php1,535 ▼018.44 ▲0.04610.80 ▼47.8466.84 ▼6.44
Media Library /wp-admin/upload.php1,400 ▲64.22 ▼0.0096.04 ▼2.6340.84 ▼3.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/afterwork-delivery/data/templates/pages/main.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/afterwork-delivery/core/classes/wtlv-afterworkdelivery.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/afterwork-delivery/data/templates/items/error-heavy.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/afterwork-delivery/data/templates/tabs/express-tarif.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/afterwork-delivery/data/templates/tabs/settings-weights.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WT_AfterWorkDelivery' not found in wp-content/plugins/afterwork-delivery/core/classes/wtlv-afterworkdelivery-classic.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WT_AfterWorkDelivery' not found in wp-content/plugins/afterwork-delivery/core/classes/wtlv-afterworkdelivery-express.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/afterwork-delivery/data/templates/tabs/classic-tariftable.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/afterwork-delivery/data/templates/tabs/classic-timetable.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/afterwork-delivery/data/templates/areas/page-header.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

afterwork-delivery/index.php 92% from 13 tests

The main PHP file in "AfterWork Delivery" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("afterwork-delivery.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,275 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP183001581,042
CSS2160150
JavaScript112083

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.50
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods3981.25%
▷ Protected methods12.08%
▷ Private methods816.67%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
data/images/afterwork-logo.png104.38KB44.11KB▼ 57.74%
data/images/logo_plugin.png3.29KB0.71KB▼ 78.27%