78% tc-pricing-table

Code Review | Pricing Table

WordPress plugin Pricing Table scored78%from 54 tests.

About plugin

  • Plugin page: tc-pricing-table
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2015
  • Latest release: May 15, 2020
  • Number of updates: 74
  • Update frequency: every 21.9 days
  • Top authors: imranemu (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /24,685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼5.68ms] Passed 4 tests

A check of server-side resources used by Pricing Table
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.29 ▼6.61
Dashboard /wp-admin3.76 ▲0.4653.80 ▼3.06
Posts /wp-admin/edit.php3.79 ▲0.4353.97 ▲1.99
Add New Post /wp-admin/post-new.php6.30 ▲0.4195.28 ▼15.02
Media Library /wp-admin/upload.php3.62 ▲0.3945.06 ▲4.45
Add New Table /wp-admin/post-new.php?post_type=tcpricingtable4.0856.84
All Tables /wp-admin/edit.php?post_type=tcpricingtable3.6744.01
Help & Upgrade /wp-admin/edit.php?post_type=tcpricingtable&page=tcpt_menu_help3.5937.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pricing Table
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.36 ▼0.271.89 ▲0.0546.28 ▲5.51
Dashboard /wp-admin2,239 ▲625.69 ▲0.0184.60 ▼7.0840.75 ▼10.23
Posts /wp-admin/edit.php2,147 ▲442.03 ▼0.0042.67 ▲3.6737.24 ▼0.10
Add New Post /wp-admin/post-new.php1,577 ▲4923.41 ▲0.41701.86 ▲23.0358.67 ▲6.11
Media Library /wp-admin/upload.php1,438 ▲354.24 ▲0.04108.23 ▼1.6450.02 ▲4.19
Add New Table /wp-admin/post-new.php?post_type=tcpricingtable2,7463.62109.5363.02
All Tables /wp-admin/edit.php?post_type=tcpricingtable1,1331.9635.4629.64
Help & Upgrade /wp-admin/edit.php?post_type=tcpricingtable&page=tcpt_menu_help1,5229.16280.9180.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tc-pricing-table/lib/tcpt-help-upgrade.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tc-pricing-table/lib/functions/tc-pricing-table-customcolumn.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tc-pricing-table/loader.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tc-pricing-table/loader.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-pricing-table/lib/functions/tc-pricing-table-metaboxes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-pricing-table/lib/metaboxes/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-pricing-table/lib/tc-pricing-table-cpt.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tc-pricing-table/lib/metaboxes/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tc-pricing-table/public/tc-pricing-table-view.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-pricing-table/lib/functions/tc-pricing-table-scripts.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-pricing-table/lib/metaboxes/example-functions.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt might help

tc-pricing-table/tc-pricing-table.php Passed 13 tests

This is the main PHP file of "Pricing Table" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
Pricing Table plugin helps to create unlimited clean and flat design based pricing table in your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin11,361 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,0541,0536,266
PHP251,0142,1573,449
SVG100655
JavaScript3164116654
Markdown21190337

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.49
Average class complexity42.62
▷ Minimum class complexity3.00
▷ Maximum class complexity121.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods195
▷ Static methods2010.26%
▷ Public methods18494.36%
▷ Protected methods84.10%
▷ Private methods31.54%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/metaboxes/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
lib/metaboxes/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
lib/metaboxes/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/metaboxes/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
lib/metaboxes/images/ico-delete.png0.70KB0.72KB0.00%