74% price-list-em

Code Review | Price List

WordPress plugin Price List scored74%from 54 tests.

About plugin

  • Plugin page: price-list-em
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 15, 2023
  • Latest release: May 15, 2023
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: elmervillanueva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /103 total downloads

Benchmarks

Plugin footprint 65% from 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.02MB] [CPU: ▼4.49ms] Passed 4 tests

A check of server-side resources used by Price List
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.26 ▲0.43
Dashboard /wp-admin3.32 ▲0.0250.27 ▼2.95
Posts /wp-admin/edit.php3.37 ▲0.0244.67 ▼0.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.27 ▼12.87
Media Library /wp-admin/upload.php3.25 ▲0.0233.90 ▼1.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 1,687 new files
Database: 1 new table, 7 new options
New tables
wp_emprice
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
em_price
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Price List
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.17 ▼0.181.81 ▼0.0043.81 ▼1.98
Dashboard /wp-admin2,198 ▲185.56 ▼0.0694.44 ▲4.1865.90 ▲27.51
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0233.80 ▼2.1736.76 ▲1.12
Add New Post /wp-admin/post-new.php1,554 ▲2823.10 ▼0.75719.07 ▲41.2050.56 ▼1.06
Media Library /wp-admin/upload.php1,409 ▲124.15 ▼0.0797.79 ▼4.8274.40 ▲28.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_emprice
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • em_price
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'PriceList_EM\\admin\\PLEM_PagesPriceListEm' not found in wp-content/plugins/price-list-em/Inc/class-Pricelist.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/price-list-em/admin/class-PricesList.php:7
    • > PHP Fatal error
      Trait 'PriceList_EM\\admin\\PLEM_PagesPriceListEm' not found in wp-content/plugins/price-list-em/admin/class-EditProduct.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PriceList_EM\\plugins_url() in wp-content/plugins/price-list-em/app.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in price-list-em/assets to your readme.txt
Please take inspiration from this readme.txt

price-list-em/app.php 92% from 13 tests

The principal PHP file in "Price List" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("price-list-em.php" instead of "app.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
No dangerous file extensions were detected17,564 lines of code in 1,648 files:
LanguageFilesBlank linesComment linesLines of code
SVG1,6120011,161
JavaScript66162462,935
CSS20241531,886
PHP8106201,469
JSON200113

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo_24.png0.70KB0.52KB▼ 25.56%
public/images/offer-shape-red.png1.43KB1.54KB0.00%
public/images/patatas_baston.png99.19KB27.23KB▼ 72.55%
public/images/offer-shape-white.png2.25KB3.06KB0.00%