90% pofw-option-css

Code Review | POFW Option CSS

WordPress plugin POFW Option CSS scored90%from 54 tests.

About plugin

  • Plugin page: pofw-option-css
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: May 18, 2020
  • Latest release: Mar 22, 2023
  • Number of updates: 4
  • Update frequency: every 259.5 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /404 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.42ms] Passed 4 tests

An overview of server-side resources used by POFW Option CSS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.10 ▲5.79
Dashboard /wp-admin3.31 ▲0.0049.24 ▼3.38
Posts /wp-admin/edit.php3.36 ▲0.0048.07 ▼7.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.64 ▼20.45
Media Library /wp-admin/upload.php3.23 ▲0.0041.20 ▲6.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

POFW Option CSS: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.751.81 ▼0.1540.02 ▼1.67
Dashboard /wp-admin2,209 ▲184.89 ▲0.00126.04 ▲13.6644.18 ▲3.17
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0234.02 ▼6.6836.18 ▼1.76
Add New Post /wp-admin/post-new.php1,533 ▼023.39 ▲0.20662.41 ▲43.8251.31 ▲0.65
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.02109.73 ▼5.6348.80 ▲3.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: product options, custom design

pofw-option-css/pofw-option-css.php Passed 13 tests

"POFW Option CSS" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
104 characters long description:
Allows to add a custom CSS class to the product options of the "Product Options for WooCommerce" plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected608 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222419546
JavaScript225052
CSS27010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.89
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods49
▷ Static methods48.16%
▷ Public methods4591.84%
▷ Protected methods00.00%
▷ Private methods48.16%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin