90% cat-block

Code Review | Cat Block

WordPress plugin Cat Block scored 90% from 54 tests.

About plugin

  • Plugin page: cat-block
  • Plugin version: 2.6.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Jan 26, 2022
  • Number of updates: 30
  • Update frequency: every 72.5 days
  • Top authors: cvmh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,305 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 gracefully, with no errors

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

An overview of server-side resources used by Cat Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.89 ▲1.99
Dashboard /wp-admin3.32 ▲0.0250.43 ▲0.38
Posts /wp-admin/edit.php3.37 ▲0.0143.90 ▼5.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.42 ▲5.24
Media Library /wp-admin/upload.php3.24 ▲0.0134.94 ▲4.39

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_cvmh_catblock_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Cat Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.67 ▼0.724.84 ▲3.2243.01 ▼1.56
Dashboard /wp-admin2,210 ▲225.89 ▲1.00105.66 ▼11.4141.49 ▼2.42
Posts /wp-admin/edit.php2,093 ▲12.03 ▼0.0040.01 ▼2.3936.16 ▲0.72
Add New Post /wp-admin/post-new.php1,527 ▼1518.48 ▲0.30688.21 ▲68.4257.50 ▲1.82
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.03101.97 ▼2.8240.96 ▼5.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_cvmh_catblock_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 uses markdown syntax to describe your plugin to the world
3 plugin tags: category, widget, taxonomy

cat-block/cat-block.php Passed 13 tests

Analyzing the main PHP file in "Cat Block" version 2.6.18
82 characters long description:
Adds a block (widget or shortcode), which scrolls through the posts in a category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected737 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP57341451
CSS2193137
PO File14595109
JavaScript191540

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected