90% pofw-option-images

Code Review | POFW Option Images

WordPress plugin POFW Option Images scored90%from 54 tests.

About plugin

  • Plugin page: pofw-option-images
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2020
  • Latest release: Apr 19, 2023
  • Number of updates: 5
  • Update frequency: every 217.4 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /492 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.01MB] [CPU: ▼4.22ms] Passed 4 tests

An overview of server-side resources used by POFW Option Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.13 ▼4.00
Dashboard /wp-admin3.31 ▼0.0450.09 ▼15.30
Posts /wp-admin/edit.php3.36 ▲0.0051.74 ▲2.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.27 ▲3.84
Media Library /wp-admin/upload.php3.23 ▲0.0036.15 ▼0.32

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by POFW Option Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.331.68 ▲0.1037.88 ▼2.76
Dashboard /wp-admin2,189 ▲95.52 ▼0.1488.17 ▲0.8040.47 ▼0.84
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0040.07 ▲2.4837.54 ▲5.56
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.01617.36 ▼2.2850.00 ▼3.38
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.1196.76 ▼2.9540.71 ▼4.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: option images, product options

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

"POFW Option Images" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Adds images to the product options of the "Product Options for WooCommerce" plugin.

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 plugin653 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1220419526
JavaScript2380116
CSS26011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.56
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.39
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin