78% image-custom-class

Code Review | Custom CSS classes for images

WordPress plugin Custom CSS classes for images scored78%from 54 tests.

About plugin

  • Plugin page: image-custom-class
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2015
  • Latest release: Jul 2, 2015
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: nivijah (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Custom CSS classes for images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.33 ▼5.16
Dashboard /wp-admin3.32 ▲0.0243.56 ▼7.14
Posts /wp-admin/edit.php3.37 ▲0.0146.31 ▼2.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.22 ▼21.81
Media Library /wp-admin/upload.php3.24 ▲0.0136.93 ▲3.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom CSS classes for images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.421.86 ▲0.2136.76 ▼6.88
Dashboard /wp-admin2,203 ▲155.78 ▲0.7596.02 ▼21.4038.93 ▼6.83
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0236.72 ▼1.5533.87 ▼1.66
Add New Post /wp-admin/post-new.php1,533 ▲1223.16 ▲0.13672.21 ▲59.4754.59 ▼7.77
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0295.61 ▼4.5042.08 ▼4.66

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/image-custom-class/index.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-custom-class/image-custom-class.php:32

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: editor class, add classes, additional class for images, media uploader class, media...

image-custom-class/image-custom-class.php 92% from 13 tests

The primary PHP file in "Custom CSS classes for images" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2151076

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin