90% pofw-pizza-toppings

Code Review | POFW Pizza Toppings

WordPress plugin POFW Pizza Toppings scored90%from 54 tests.

About plugin

  • Plugin page: pofw-pizza-toppings
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Jul 28, 2022
  • Number of updates: 3
  • Update frequency: every 261.7 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.19ms] Passed 4 tests

An overview of server-side resources used by POFW Pizza Toppings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.27 ▼1.57
Dashboard /wp-admin3.31 ▼0.0447.96 ▼15.99
Posts /wp-admin/edit.php3.36 ▲0.0046.93 ▼9.38
Add New Post /wp-admin/post-new.php5.89 ▲0.00108.49 ▼1.83
Media Library /wp-admin/upload.php3.23 ▲0.0037.81 ▲1.05

Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/pofw-pizza-toppings/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for POFW Pizza Toppings
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.321.81 ▼0.6543.73 ▲0.72
Dashboard /wp-admin2,218 ▲125.82 ▲0.0298.42 ▼5.0839.51 ▼5.47
Posts /wp-admin/edit.php2,097 ▼62.00 ▼0.0537.07 ▼3.0531.42 ▼5.88
Add New Post /wp-admin/post-new.php1,545 ▲1423.10 ▼0.23590.41 ▼34.1059.00 ▲2.60
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.05101.82 ▼2.0542.39 ▼6.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: product options, pizza toppings

pofw-pizza-toppings/pofw-pizza-toppings.php Passed 13 tests

The entry point to "POFW Pizza Toppings" version 1.0.0 is a PHP file that has certain tags in its header comment area
64 characters long description:
Displays product options with special layout for pizza toppings.

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
No dangerous file extensions were detected705 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1523920645
JavaScript234055
CSS2405

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.82
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods65
▷ Static methods46.15%
▷ Public methods6193.85%
▷ Protected methods00.00%
▷ Private methods46.15%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/adminhtml/web/product/edit/option_sort_order.png85.77KB23.03KB▼ 73.14%
view/adminhtml/web/product/edit/checkbox_option.png73.22KB19.61KB▼ 73.22%