94% advance-pricing-table

Code Review | Advance Pricing Table

WordPress plugin Advance Pricing Table scored 94% from 54 tests.

About plugin

  • Plugin page: advance-pricing-t...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 5.9.2
  • First release: Mar 19, 2015
  • Latest release: May 20, 2018
  • Number of updates: 9
  • Update frequency: every 128.8 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,667 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼294.85ms] Passed 4 tests

A check of server-side resources used by Advance Pricing Table
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.52 ▲6.46
Dashboard /wp-admin3.42 ▲0.0132.99 ▼1.72
Posts /wp-admin/edit.php3.65 ▲0.0139.54 ▲2.27
Add New Post /wp-admin/post-new.php6.90 ▼0.0798.41 ▼1,172.64
Media Library /wp-admin/upload.php3.30 ▲0.0026.08 ▼7.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advance Pricing Table
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,775 ▲2115.71 ▼0.296.35 ▼0.622.54 ▼0.13
Dashboard /wp-admin2,899 ▲416.16 ▼0.01125.83 ▼5.64161.62 ▼1.09
Posts /wp-admin/edit.php2,692 ▲13.23 ▲0.0064.69 ▼0.91140.62 ▼0.67
Add New Post /wp-admin/post-new.php1,670 ▼9020.76 ▼2.03420.26 ▼6.08156.92 ▼5.88
Media Library /wp-admin/upload.php1,702 ▲45.55 ▲0.06134.43 ▼10.46187.00 ▼8.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advance-pricing-table/includes/wpb_shortcode.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

advance-pricing-table/main.php 92% from 13 tests

This is the main PHP file of "Advance Pricing Table" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advance-pricing-table.php" instead of "main.php")

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
Good job! No executable or dangerous file extensions detected1,041 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS288897
PHP44742144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin