84% marketpress-australia-post

Code Review | MarketPress Australia Post

WordPress plugin MarketPress Australia Post scored 84% from 54 tests.

About plugin

  • Plugin page: marketpress-austr...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2015
  • Latest release: Mar 4, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: corlax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by MarketPress Australia Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.24 ▼5.51
Dashboard /wp-admin3.31 ▲0.0144.96 ▼0.28
Posts /wp-admin/edit.php3.36 ▲0.0045.98 ▼1.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.76 ▼17.98
Media Library /wp-admin/upload.php3.23 ▲0.0032.50 ▼3.39

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for MarketPress Australia Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.60 ▼0.794.50 ▲2.7242.47 ▼3.33
Dashboard /wp-admin2,206 ▲185.81 ▲0.9399.05 ▼10.3438.27 ▼4.26
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0235.52 ▼3.7630.99 ▼4.59
Add New Post /wp-admin/post-new.php1,534 ▼823.21 ▲4.95626.35 ▼12.2557.09 ▼1.67
Media Library /wp-admin/upload.php1,388 ▼04.17 ▲0.0395.41 ▲1.0742.19 ▲1.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/marketpress-australia-post/aust-post.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'MP_Shipping_API' not found in wp-content/plugins/marketpress-australia-post/api.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: plugins, ecommerce, wordpress

marketpress-australia-post/aust-post.php 92% from 13 tests

"MarketPress Australia Post" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("marketpress-australia-post.php" instead of "aust-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin487 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2135135487

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.67
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2074.07%
▷ Protected methods00.00%
▷ Private methods725.93%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin