10% goodlocal-express

Code Review | GoodLocal Express

WordPress plugin GoodLocal Express scored 10% from 54 tests.

About plugin

  • Plugin page: goodlocal-express
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9.2
  • WordPress version: 5.9.2
  • First release: Mar 22, 2022
  • Latest release: Mar 23, 2022
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: goodlocalej (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 33 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/goodlocal-express/goodlocal-shipping.php+37
    Uncaught Error: Call to undefined function wp_get_active_network_plugins() in wp-content/plugins/goodlocal-express/goodlocal-shipping.php:37
    Stack trace:
    #0 wp-admin/includes/plugin.php(2288): include_once()
    #1 wp-admin/includes/plugin.php(659): plugin_sandbox_scrape()

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

Server-side resources used by GoodLocal Express
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.37 ▲5.00
Dashboard /wp-admin3.41 ▲0.0031.93 ▼2.73
Posts /wp-admin/edit.php3.64 ▲0.0036.24 ▼1.38
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.39 ▼1,161.70
Media Library /wp-admin/upload.php3.29 ▲0.0024.04 ▼0.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GoodLocal Express
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲2116.01 ▲0.027.38 ▲1.722.42 ▲0.36
Dashboard /wp-admin2,895 ▲376.13 ▼0.06116.17 ▼28.22155.81 ▼10.06
Posts /wp-admin/edit.php2,688 ▼63.24 ▼0.0162.63 ▼3.94129.68 ▼14.17
Add New Post /wp-admin/post-new.php1,661 ▼9917.00 ▼5.50421.49 ▼12.03155.25 ▲3.42
Media Library /wp-admin/upload.php1,698 ▼05.50 ▲0.04144.96 ▼2.77186.26 ▲1.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in goodlocal-express/assets to your readme.txt
The official readme.txt might help

goodlocal-express/goodlocal-shipping.php 85% from 13 tests

The main PHP file in "GoodLocal Express" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("goodlocal-express.php" instead of "goodlocal-shipping.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 223 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin174 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14074174

PHP code Passed 2 tests

This is a very shot 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.33
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin