83% twp-table

Code Review | TWP Pricing Table

WordPress plugin TWP Pricing Table scored 83% from 54 tests.

About plugin

  • Plugin page: twp-table
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 5.8.1
  • First release: May 1, 2020
  • Latest release: May 1, 2020
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: ivandolera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 169 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.21MB] [CPU: ▼153.27ms] Passed 4 tests

An overview of server-side resources used by TWP Pricing Table
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2336.69 ▲13.49
Dashboard /wp-admin3.19 ▲0.1445.81 ▲4.45
Posts /wp-admin/edit.php3.30 ▲0.1941.90 ▼1.88
Add New Post /wp-admin/post-new.php4.15 ▼1.2947.99 ▼614.76
Media Library /wp-admin/upload.php3.11 ▲0.1132.26 ▼0.90
Add New /wp-admin/post-new.php?post_type=twp-table3.0433.01
All Tables /wp-admin/edit.php?post_type=twp-table3.1943.91

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by TWP Pricing Table
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,076 ▲48018.50 ▲3.0814.33 ▲6.2148.42 ▲0.54
Dashboard /wp-admin3,230 ▲2968.35 ▲2.32158.31 ▲15.15110.45 ▼8.15
Posts /wp-admin/edit.php3,022 ▲2834.41 ▲1.7380.36 ▲13.4895.72 ▼0.57
Add New Post /wp-admin/post-new.php1,714 ▲21618.90 ▲0.01351.06 ▼26.74103.31 ▼5.40
Media Library /wp-admin/upload.php1,871 ▲615.01 ▼0.02120.22 ▼52.90117.97 ▲2.72
Add New /wp-admin/post-new.php?post_type=twp-table2,7604.90104.4294.41
All Tables /wp-admin/edit.php?post_type=twp-table1,6844.3282.1373.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=twp-table
    • > Notice in wp-content/plugins/twp-table/admin/admin.php+341
    Undefined index: post_type

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/twp-table/twp-table.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/twp-table/admin/admin.php:3

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)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=twp-table
    • > Javascript (severe) in unknown
    /wp-content/plugins/twp-table/js/twp-admin-scripts.js?ver=5.8.1 31:30 Uncaught TypeError: jQuery(...).live is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=twp-table
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/twp-table/js/twp-admin-scripts.js?ver=5.8.1:18:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=twp-table
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: pricing, table, chart, table chart, responsive pricing...

twp-table/twp-table.php Passed 13 tests

The primary PHP file in "TWP Pricing Table" version 1.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Responsive and Lightweight, ready to use in any pricing table design

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 plugin819 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP223331534
JavaScript27046176
CSS2333109

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin