84% c4d-category-image

Code Review | Category Image

WordPress plugin Category Image scored84%from 54 tests.

About plugin

  • Plugin page: c4d-category-image
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 19, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 8
  • Update frequency: every 3.0 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.03ms] Passed 4 tests

Server-side resources used by Category Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.13 ▼2.86
Dashboard /wp-admin3.33 ▲0.0347.81 ▼5.43
Posts /wp-admin/edit.php3.42 ▲0.0750.82 ▲1.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.54 ▼12.60
Media Library /wp-admin/upload.php3.24 ▲0.0134.32 ▲0.78

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Category Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.96 ▲0.371.63 ▼0.1040.58 ▼5.24
Dashboard /wp-admin2,350 ▲1626.44 ▲0.54131.93 ▲27.3341.60 ▼3.64
Posts /wp-admin/edit.php2,259 ▲1673.33 ▲1.3547.67 ▲5.3031.69 ▼6.54
Add New Post /wp-admin/post-new.php1,521 ▲223.29 ▲0.36627.34 ▲27.3338.03 ▼12.26
Media Library /wp-admin/upload.php1,395 ▲104.14 ▼0.0579.76 ▼22.0741.77 ▼0.25

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

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-category-image/c4d-category-image.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

c4d-category-image/c4d-category-image.php Passed 13 tests

This is the main PHP file of "Category Image" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
23 characters long description:
Set image for category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected145 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1189104
JavaScript24030
CSS10011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin