84% simple-pricing-table

Code Review | Simple Pricing Table

WordPress plugin Simple Pricing Table scored84%from 54 tests.

About plugin

  • Plugin page: simple-pricing-table
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 27, 2018
  • Latest release: Oct 27, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: seothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,008 total downloads

Benchmarks

Plugin footprint 83% from 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.58MB] [CPU: ▼0.59ms] Passed 4 tests

An overview of server-side resources used by Simple Pricing Table
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4037.08 ▲1.13
Dashboard /wp-admin3.97 ▲0.6252.88 ▼6.76
Posts /wp-admin/edit.php3.99 ▲0.6348.79 ▲4.56
Add New Post /wp-admin/post-new.php6.56 ▲0.6784.39 ▼1.30
Media Library /wp-admin/upload.php3.89 ▲0.6640.28 ▲5.96
All Pricing Tables /wp-admin/edit.php?post_type=simple_pricing_table3.9442.24
Add New /wp-admin/post-new.php?post_type=simple_pricing_table4.1947.10

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 365 new files
Database: no new tables, 7 new options
New WordPress options
widget_spt_widget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Simple Pricing Table: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.35 ▲0.001.73 ▲0.1839.91 ▼0.82
Dashboard /wp-admin2,230 ▲495.60 ▼0.1285.55 ▼14.2837.03 ▼3.10
Posts /wp-admin/edit.php2,140 ▲402.03 ▲0.0335.09 ▼0.7135.83 ▼7.01
Add New Post /wp-admin/post-new.php1,556 ▲3023.71 ▲0.65667.35 ▼48.1259.10 ▼8.02
Media Library /wp-admin/upload.php1,438 ▲384.27 ▲0.07100.11 ▼5.8242.13 ▼3.21
All Pricing Tables /wp-admin/edit.php?post_type=simple_pricing_table1,1141.9732.3429.85
Add New /wp-admin/post-new.php?post_type=simple_pricing_table1,7162.6351.6659.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_spt_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 43× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-pricing-table/includes/cpt.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-pricing-table/includes/shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/simple-pricing-table/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Edit Pricing Table screen)
Please take inspiration from this readme.txt

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

The primary PHP file in "Simple Pricing Table" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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 plugin46,792 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78717,86831,576
PHP612,1296,0207,177
CSS141,1831,1444,731
Sass16300251,374
JavaScript63174081,296
Markdown32150638

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.24
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes67
▷ Abstract classes811.94%
▷ Concrete classes5988.06%
▷ Final classes00.00%
Methods521
▷ Static methods8616.51%
▷ Public methods42982.34%
▷ Protected methods8917.08%
▷ Private methods30.58%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.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
14 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%