84% woo-subcategory-thumb

Code Review | Woo Subcategory Thumb

WordPress plugin Woo Subcategory Thumb scored84%from 54 tests.

About plugin

  • Plugin page: woo-subcategory-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0.0
  • WordPress version: 6.3.1
  • First release: Sep 4, 2015
  • Latest release: Sep 25, 2022
  • Number of updates: 11
  • Update frequency: every 234.4 days
  • Top authors: raficsedu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.84ms] Passed 4 tests

Analyzing server-side resources used by Woo Subcategory Thumb
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.78 ▼8.08
Dashboard /wp-admin3.31 ▲0.0044.03 ▼7.43
Posts /wp-admin/edit.php3.36 ▲0.0048.13 ▲0.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.69 ▲0.25
Media Library /wp-admin/upload.php3.23 ▲0.0031.57 ▼4.10

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

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

Browser metrics Passed 4 tests

Woo Subcategory Thumb: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.48 ▼0.262.00 ▲0.2142.02 ▼10.83
Dashboard /wp-admin2,203 ▲125.91 ▲1.03109.41 ▼4.9338.50 ▼8.04
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0339.64 ▲2.6034.97 ▲2.29
Add New Post /wp-admin/post-new.php1,533 ▼423.20 ▲0.04578.20 ▼58.8049.87 ▲1.09
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0694.32 ▼7.2041.89 ▼0.09

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

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-subcategory-thumb/woo-subcategory-thumb.php:11

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 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:
  • Screenshots: Please add an image for screenshot #1 (Sample front end preview .)
The official readme.txt is a good inspiration

woo-subcategory-thumb/woo-subcategory-thumb.php Passed 13 tests

The primary PHP file in "Woo Subcategory Thumb" version 1.0 is used by WordPress to initiate all plugin functionality
69 characters long description:
This plugin will show subcategory thumbnail on parent category page .

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
Success! There were no dangerous files found in this plugin69 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131042
CSS10027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
skin/images/No_image.png9.34KB10.01KB0.00%