83% easy-pricing-table-wp

Code Review | Easy Pricing Table WP

WordPress plugin Easy Pricing Table WP scored83%from 54 tests.

About plugin

  • Plugin page: easy-pricing-tabl...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jun 1, 2023
  • Latest release: Nov 9, 2023
  • Number of updates: 9
  • Update frequency: every 17.9 days
  • Top authors: pluginwale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.64ms] Passed 4 tests

Server-side resources used by Easy Pricing Table WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.33 ▼7.89
Dashboard /wp-admin3.40 ▲0.1047.26 ▼0.75
Posts /wp-admin/edit.php3.51 ▲0.1651.70 ▲8.16
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.91 ▼13.97
Media Library /wp-admin/upload.php3.32 ▲0.0937.54 ▲4.06
Add Pricing Table /wp-admin/post-new.php?post_type=easy-pricing3.5343.44
All Pricing Table /wp-admin/edit.php?post_type=easy-pricing3.3234.37

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Pricing Table WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.37 ▲0.151.62 ▲0.0139.40 ▼4.05
Dashboard /wp-admin2,222 ▲455.68 ▲0.0388.00 ▼8.4641.22 ▼5.44
Posts /wp-admin/edit.php2,130 ▲331.99 ▲0.0439.30 ▲2.9036.30 ▼0.85
Add New Post /wp-admin/post-new.php1,549 ▲2023.20 ▼0.38596.43 ▼79.0370.74 ▲20.51
Media Library /wp-admin/upload.php1,427 ▲244.18 ▼0.0196.01 ▼6.3542.95 ▼1.23
Add Pricing Table /wp-admin/post-new.php?post_type=easy-pricing3,6424.19140.57101.59
All Pricing Table /wp-admin/edit.php?post_type=easy-pricing1,0991.9534.4731.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=easy-pricing
    • > Notice in wp-content/plugins/easy-pricing-table-wp/easy-pricing-table.php+70
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=easy-pricing
    • > Notice in wp-content/plugins/easy-pricing-table-wp/easy-pricing-table.php+70
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=easy-pricing
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

easy-pricing-table-wp/easy-pricing-table.php 85% from 13 tests

The main PHP script in "Easy Pricing Table WP" version 1.0.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-pricing-table-wp.php" instead of "easy-pricing-table.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected23,580 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,5634410,899
SVG3009,546
PHP11277732,259
JavaScript65333876

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity19.50
▷ Minimum class complexity9.00
▷ Maximum class complexity30.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1386.67%
▷ Protected methods213.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/1.png11.97KB6.42KB▼ 46.31%
assets/img/2.png19.86KB8.14KB▼ 59.02%
assets/img/4.png28.68KB9.36KB▼ 67.36%
assets/img/3.png20.18KB7.07KB▼ 64.95%