90% better-categories-images

Code Review | Better Categories Images

WordPress plugin Better Categories Images scored90%from 54 tests.

About plugin

  • Plugin page: better-categories...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2018
  • Latest release: Aug 11, 2018
  • Number of updates: 10
  • Update frequency: every 5.9 days
  • Top authors: namncn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.32ms] Passed 4 tests

An overview of server-side resources used by Better Categories Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.80 ▼6.52
Dashboard /wp-admin3.37 ▲0.0746.88 ▼1.44
Posts /wp-admin/edit.php3.42 ▲0.0748.68 ▲4.59
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.37 ▲0.45
Media Library /wp-admin/upload.php3.29 ▲0.0734.40 ▲2.24
Better Categories Images /wp-admin/options-general.php?page=bci-options3.2630.34

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Better Categories Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.28 ▼1.471.77 ▼0.0943.75 ▼0.60
Dashboard /wp-admin2,212 ▲305.87 ▲0.99102.20 ▼7.8338.11 ▼4.52
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0539.07 ▲2.4634.61 ▼2.04
Add New Post /wp-admin/post-new.php1,533 ▼023.31 ▼0.05669.49 ▼10.9552.23 ▼2.07
Media Library /wp-admin/upload.php1,394 ▲64.25 ▲0.0395.67 ▼9.4743.86 ▼1.97
Better Categories Images /wp-admin/options-general.php?page=bci-options7962.0624.1528.11

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: term field, category, taxonomy, images

better-categories-images/better-categories-images.php Passed 13 tests

The main PHP script in "Better Categories Images" version 1.0.3 is automatically included on every request by WordPress
89 characters long description:
The Better Categories Images Plugin allow you to add image with any category or taxonomy.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin330 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP271154276
PO File1122349
CSS1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/placeholder.png24.75KB10.16KB▼ 58.94%