66% electro-pricing-tables-lite

Code Review | Electro Pricing Tables Lite

WordPress plugin Electro Pricing Tables Lite scored66%from 54 tests.

About plugin

  • Plugin page: electro-pricing-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 16, 2017
  • Latest release: Mar 16, 2017
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: kingrayhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /536 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.13MB] [CPU: ▼2.10ms] Passed 4 tests

A check of server-side resources used by Electro Pricing Tables Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.96 ▼2.07
Dashboard /wp-admin3.48 ▲0.1849.25 ▼3.74
Posts /wp-admin/edit.php3.53 ▲0.1750.96 ▲7.54
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.53 ▼6.02
Media Library /wp-admin/upload.php3.31 ▲0.0935.64 ▲3.45
Add New Table /wp-admin/post-new.php?post_type=et_pricing_table3.4243.29
All Items /wp-admin/edit.php?post_type=et_pricing_table3.4539.68

Server storage [IO: ▲3.26MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 132 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Electro Pricing Tables Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲29015.43 ▲1.062.12 ▲0.3269.97 ▲24.63
Dashboard /wp-admin2,403 ▲2157.03 ▲2.14136.74 ▲20.36106.26 ▲61.86
Posts /wp-admin/edit.php2,327 ▲2413.90 ▲1.8554.81 ▲19.8056.76 ▲23.43
Add New Post /wp-admin/post-new.php1,580 ▲4617.80 ▼5.38628.89 ▲1.90149.82 ▲93.35
Media Library /wp-admin/upload.php1,466 ▲844.74 ▲0.5586.65 ▼11.8182.65 ▲39.11
Add New Table /wp-admin/post-new.php?post_type=et_pricing_table2,0104.3977.15129.99
All Items /wp-admin/edit.php?post_type=et_pricing_table1,2933.4949.4685.41

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

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

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=et_pricing_table
    • > Notice in wp-content/plugins/electro-pricing-tables-lite/lib/codestar-framework-1.0.1/classes/metabox.class.php+70
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/karma.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/norbu.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/pema.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/tashi.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/yonten.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/sonam.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/tenzin.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/yama.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/jinpa.php
    • > /wp-content/plugins/electro-pricing-tables-lite/designs/palden.php
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: et_metas in wp-content/plugins/electro-pricing-tables-lite/designs/tenzin.php on line 3
    • > PHP Notice
      Undefined variable: et_metas in wp-content/plugins/electro-pricing-tables-lite/designs/tashi.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/electro-pricing-tables-lite/designs/sonam.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/electro-pricing-tables-lite/designs/palden.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/electro-pricing-tables-lite/designs/norbu.php on line 3
    • > PHP Notice
      Undefined variable: et_metas in wp-content/plugins/electro-pricing-tables-lite/designs/karma.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/electro-pricing-tables-lite/et-pricing-table-post-type.php:2
    • > PHP Notice
      Undefined variable: et_metas in wp-content/plugins/electro-pricing-tables-lite/designs/rabten.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/electro-pricing-tables-lite/designs/rabten.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/electro-pricing-tables-lite/pricing-table-shortcode.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=et_pricing_table
    • > Network (severe)
    wp-content/plugins/electro-pricing-tables-lite/assets/designs/tenzin.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #10 (pricing tables lists), #11 (Choose pricing table design), #13 (Add new table)
The official readme.txt might help

electro-pricing-tables-lite/plugin-main.php 92% from 13 tests

The main PHP file in "Electro Pricing Tables Lite" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("electro-pricing-tables-lite.php" instead of "plugin-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin33,778 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
JSON20012,928
PHP641,5201,2145,406
CSS9323785,032
JavaScript81,0687934,533
SVG2003,326
Sass531801,952
PO File6261285601

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity13.50
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes26.25%
▷ Concrete classes3093.75%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods101100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions4896.00%
▷ Anonymous functions24.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.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
18 PNG files occupy 0.36MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/codestar-framework-1.0.1/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/designs/yama.png18.11KB8.51KB▼ 53.01%
assets/designs/dawa.png133.48KB69.40KB▼ 48.01%
assets/images/line.png1.53KB1.81KB0.00%
assets/designs/sonam.png11.27KB6.33KB▼ 43.84%