58% permaplate-furniture-protection

Code Review | PermaPlate Furniture Protection

WordPress plugin PermaPlate Furniture Protection scored58%from 54 tests.

About plugin

  • Plugin page: permaplate-furnit...
  • Plugin version: 3.7.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2022
  • Latest release: Jun 15, 2023
  • Number of updates: 131
  • Update frequency: every 2.9 days
  • Top authors: permaplatequickcover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /919 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.41MB] [CPU: ▼30.45ms] Passed 4 tests

A check of server-side resources used by PermaPlate Furniture Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5545.25 ▲1.46
Dashboard /wp-admin3.53 ▲0.2327.43 ▼25.60
Posts /wp-admin/edit.php3.53 ▲0.1825.90 ▼16.54
Add New Post /wp-admin/post-new.php3.53 ▼2.3526.41 ▼75.34
Media Library /wp-admin/upload.php3.53 ▲0.3029.85 ▼4.31
Settings /wp-admin/admin.php?page=Permaplate3.5325.38

Server storage [IO: ▲0.70MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 7 new tables, 7 new options
New tables
quickcover_cron_status
batchsync_status
quickcover_contract
product_warranty
app_configurations
product_backup
warranty_calc
New WordPress options
jal_db_version
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PermaPlate Furniture Protection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19813.90 ▼0.346.88 ▲4.9044.32 ▲0.62
Dashboard /wp-admin2,247 ▲595.33 ▲0.22102.42 ▼14.4232.82 ▼9.90
Posts /wp-admin/edit.php2,138 ▲462.44 ▲0.4436.31 ▼3.3727.62 ▼9.82
Add New Post /wp-admin/post-new.php1,703 ▲16923.05 ▼0.12598.63 ▼3.1727.00 ▼21.88
Media Library /wp-admin/upload.php1,498 ▲1074.59 ▲0.4297.58 ▲0.9738.65 ▼3.99
Settings /wp-admin/admin.php?page=Permaplate1,2192.1029.2331.17
Bulk Product Update /wp-admin/admin.php?page=Bulk Product Update9562.0027.3726.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure failed, leaving 7 tables in the database
    • app_configurations
    • product_backup
    • quickcover_cron_status
    • batchsync_status
    • warranty_calc
    • product_warranty
    • quickcover_contract
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • jal_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > Notice in wp-content/plugins/permaplate-furniture-protection/form.php+237
    Undefined variable: getTotal_batch
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > Notice in wp-content/plugins/permaplate-furniture-protection/form.php+173
    Undefined variable: getSuccess_batch
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > Notice in wp-content/plugins/permaplate-furniture-protection/form.php+174
    Undefined variable: getFailed_batch
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > Notice in wp-content/plugins/permaplate-furniture-protection/form.php+175
    Undefined variable: get_Latestdate
    • > GET request to /wp-admin/admin.php?page=Permaplate
    • > Notice in wp-content/plugins/permaplate-furniture-protection/form.php+182
    Undefined variable: counProduct

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/permaplate-furniture-protection/Custom_app.php:31
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/permaplate-furniture-protection/form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/permaplate-furniture-protection/bulkUpdate.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/permaplate-furniture-protection/uninstall.php:4

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

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: The official readme.txt might help

permaplate-furniture-protection/Custom_app.php 92% from 13 tests

"PermaPlate Furniture Protection" version 3.7.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("permaplate-furniture-protection.php" instead of "Custom_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
Success! There were no dangerous files found in this plugin3,932 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP47241653,046
JavaScript59056561
CSS44414325

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity364.00
▷ Minimum class complexity364.00
▷ Maximum class complexity364.00
Average method complexity6.85
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/scr1.PNG43.33KB25.00KB▼ 42.30%
assets/src2.PNG40.81KB18.39KB▼ 54.93%
assets/images/logo.png8.32KB3.95KB▼ 52.50%