89% images-to-div-converter

Code Review | WC Catalog images to DIV convertor

WordPress plugin WC Catalog images to DIV convertor scored89%from 54 tests.

About plugin

  • Plugin page: images-to-div-con...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Sep 16, 2023
  • Number of updates: 21
  • Update frequency: every 40.4 days
  • Top authors: wpspin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /907 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: ▼9.40ms] Passed 4 tests

An overview of server-side resources used by WC Catalog images to DIV convertor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0722.81 ▼16.13
Dashboard /wp-admin3.32 ▲0.0148.76 ▼3.61
Posts /wp-admin/edit.php3.37 ▲0.0150.95 ▼1.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.51 ▼13.96
Media Library /wp-admin/upload.php3.24 ▲0.0132.20 ▼3.88

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

WC Catalog images to DIV convertor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,483 ▼27814.74 ▼0.050.74 ▼0.9720.57 ▼20.64
Dashboard /wp-admin2,224 ▲244.86 ▼0.99105.78 ▼1.7042.90 ▲0.60
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0340.75 ▲1.7236.63 ▲1.32
Add New Post /wp-admin/post-new.php1,550 ▲1923.29 ▲0.11650.19 ▼19.0261.42 ▲9.32
Media Library /wp-admin/upload.php1,406 ▲64.23 ▲0.0495.68 ▼12.8844.70 ▼2.54

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

images-to-div-converter/wpx-imagebg.php 69% from 13 tests

The main PHP file in "WC Catalog images to DIV convertor" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("images-to-div-converter.php" instead of "wpx-imagebg.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

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
Success! There were no dangerous files found in this plugin272 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1440157
PHP3195680
JavaScript11135

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin