82% abc-pricing-table

Code Review | Pricing Table - Price list, Price Table, Easy Pricing Table

WordPress plugin Pricing Table - Price list, Price Table, Easy Pricing Table scored 82% from 54 tests.

About plugin

  • Plugin page: abc-pricing-table
  • Plugin version: 1.1.25
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 24, 2017
  • Latest release: Mar 31, 2022
  • Number of updates: 114
  • Update frequency: every 14.4 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

5,000+ active / 87,754 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▼297.22ms] 75% from 4 tests

An overview of server-side resources used by Pricing Table - Price list, Price Table, Easy Pricing Table
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,478.65ms on /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page)
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5457.93 ▲2.80
Dashboard /wp-admin3.92 ▲0.5137.24 ▲2.68
Posts /wp-admin/edit.php4.14 ▲0.5042.96 ▲2.01
Add New Post /wp-admin/post-new.php7.44 ▲0.4795.49 ▼1,196.37
Media Library /wp-admin/upload.php3.86 ▲0.5629.02 ▲4.73
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins4.0126.20
Add Pricing Table /wp-admin/post-new.php?post_type=abc-pricing4.3641.99
All Pricing Table /wp-admin/edit.php?post_type=abc-pricing3.8526.40
Our Plugins /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page4.091,478.65

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 69 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Pricing Table - Price list, Price Table, Easy Pricing Table
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,998 ▲27616.21 ▲0.569.11 ▲3.142.95 ▲0.43
Dashboard /wp-admin2,988 ▲1346.12 ▼0.03120.66 ▼16.71177.12 ▲18.24
Posts /wp-admin/edit.php2,794 ▲1033.25 ▲0.0273.15 ▼4.38162.57 ▼5.12
Add New Post /wp-admin/post-new.php1,733 ▲3518.26 ▼3.39384.68 ▼44.99153.85 ▼3.57
Media Library /wp-admin/upload.php1,804 ▲1065.57 ▲0.08154.86 ▲4.51201.62 ▲16.10
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,3602.6353.99122.39
Add Pricing Table /wp-admin/post-new.php?post_type=abc-pricing6,5306.82215.35510.24
All Pricing Table /wp-admin/edit.php?post_type=abc-pricing1,4873.1762.07131.60
Our Plugins /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page4,9062.7667.06219.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/include/add-new-pricing.php+518
    Undefined variable: apt_feature_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/include/add-new-pricing.php+528
    Undefined variable: apt_icon_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/include/add-new-pricing.php+660
    Undefined variable: apt_featured_text_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/include/add-new-pricing.php+670
    Undefined variable: apt_featured_icon_color
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/abc-pricing-table.php+82
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing
    • > Notice in wp-content/plugins/abc-pricing-table/abc-pricing-table.php+82
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/abc-pricing-table/assets/css/template4.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/abc-pricing-table/featured-plugins/featured-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/abc-pricing-table/assets/css/template3.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/abc-pricing-table/assets/css/template1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/abc-pricing-table/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/abc-pricing-table/assets/css/template2.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page
    • > Network (severe)
    wp-content/plugins/abc-pricing-table/css/bootstrap.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page
    • > Network (severe)
    wp-content/plugins/abc-pricing-table/js/bootstrap.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page
    • > Network (severe)
    wp-content/plugins/abc-pricing-table/js/featured-plugins/acl-media-upload-script.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=abc-pricing&page=pricing-featured-plugins-page
    • > Network (severe)
    wp-content/plugins/abc-pricing-table/js/featured-plugins/bootstrap.min.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not 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
5 plugin tags: price table, pricing table, pricing, price, table

abc-pricing-table/abc-pricing-table.php 92% from 13 tests

The main file in "Pricing Table - Price list, Price Table, Easy Pricing Table" v. 1.1.25 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin52,816 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS127,13412735,309
SVG50010,489
PHP96451,6724,165
JavaScript860482,713
PO File16166140

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity43.38
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods115
▷ Static methods54.35%
▷ Public methods9078.26%
▷ Protected methods2521.74%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.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
11 PNG files occupy 0.24MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/img/4.png11.63KB8.86KB▼ 23.86%
include/img/3.png11.90KB9.05KB▼ 23.96%
include/img/set3.png36.47KB33.77KB▼ 7.39%
assets/img/2017-12-08_20-43-13.png7.88KB3.43KB▼ 56.42%
include/img/2.png12.56KB9.78KB▼ 22.13%