84% terminal-africa

Code Review | Terminal Africa

WordPress plugin Terminal Africa scored84%from 54 tests.

About plugin

  • Plugin page: terminal-africa
  • Plugin version: 1.11.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 64
  • Update frequency: every 3.8 days
  • Top authors: terminalafrica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,785 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.65ms] Passed 4 tests

This is a short check of server-side resources used by Terminal Africa
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0434.18 ▼9.32
Dashboard /wp-admin3.35 ▲0.0045.89 ▼17.33
Posts /wp-admin/edit.php3.46 ▲0.1046.93 ▼1.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.96 ▼2.43
Media Library /wp-admin/upload.php3.27 ▲0.0432.72 ▼0.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Terminal Africa
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4814.31 ▲0.171.69 ▼0.0538.35 ▼4.88
Dashboard /wp-admin2,197 ▲265.53 ▼0.1391.45 ▼5.4739.02 ▼5.01
Posts /wp-admin/edit.php2,105 ▲51.95 ▼0.0240.86 ▼4.1236.81 ▲0.14
Add New Post /wp-admin/post-new.php1,531 ▲423.04 ▼0.22569.07 ▼120.4065.91 ▲16.96
Media Library /wp-admin/upload.php1,408 ▲54.30 ▲0.0898.73 ▼2.5144.19 ▲0.84

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 28× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/terminal-africa/includes/parts/assets.php
    • > /wp-content/plugins/terminal-africa/templates/shipping.php
    • > /wp-content/plugins/terminal-africa/templates/error.php
    • > /wp-content/plugins/terminal-africa/templates/auth.php
    • > /wp-content/plugins/terminal-africa/includes/parts/api.php
    • > /wp-content/plugins/terminal-africa/includes/class-terminal-africa.php
    • > /wp-content/plugins/terminal-africa/templates/shipment-button/cancel-shipment.php
    • > /wp-content/plugins/terminal-africa/app/Terminal/Core/TemplateLoader.php
    • > /wp-content/plugins/terminal-africa/includes/terminalLogHandler.php
    • > /wp-content/plugins/terminal-africa/templates/shipment-button/duplicate-shipment.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in terminal-africa/assets to your readme.txt
Please take inspiration from this readme.txt

terminal-africa/terminal-africa.php Passed 13 tests

The entry point to "Terminal Africa" version 1.11.3 is a PHP file that has certain tags in its header comment area
54 characters long description:
Terminal Africa Shipping Method Plugin for WooCommerce

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
No dangerous file extensions were detected19,318 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP385452,3627,455
JavaScript172692,3006,718
CSS9718684,882
Markdown11050191
JSON10037
SVG70135

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity42.44
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces3
Interfaces0
Traits6
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods190
▷ Static methods7036.84%
▷ Public methods18295.79%
▷ Protected methods73.68%
▷ Private methods10.53%
Functions50
▷ Named functions4590.00%
▷ Anonymous functions510.00%
Constants16
▷ Global constants1168.75%
▷ Class constants531.25%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/check.png2.34KB0.95KB▼ 59.16%
assets/img/6154615bd81a7d57e6fe1cd2_ProductCircleBG.png16.58KB6.97KB▼ 57.95%
assets/img/logo-footer.png46.25KB19.45KB▼ 57.95%
assets/img/WalletIcon.png1.84KB0.95KB▼ 48.33%
assets/img/logo-full.png36.99KB19.20KB▼ 48.08%