78% cab-grid

Code Review | Cab Grid

WordPress plugin Cab Grid scored78%from 54 tests.

About plugin

  • Plugin page: cab-grid
  • Plugin version: 1.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2015
  • Latest release: Nov 9, 2023
  • Number of updates: 108
  • Update frequency: every 26.9 days
  • Top authors: nimusdigital (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

200+ active /23,635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.94ms] Passed 4 tests

This is a short check of server-side resources used by Cab Grid
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.31 ▼6.10
Dashboard /wp-admin3.43 ▲0.1342.84 ▼2.11
Posts /wp-admin/edit.php3.54 ▲0.1947.65 ▼1.22
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.75 ▼2.32
Media Library /wp-admin/upload.php3.35 ▲0.1236.40 ▲3.19

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cab Grid
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13613.77 ▼0.5811.69 ▲9.9838.37 ▼3.92
Dashboard /wp-admin2,210 ▲305.56 ▼0.0688.97 ▼9.1480.59 ▲41.50
Posts /wp-admin/edit.php2,112 ▲121.99 ▲0.0439.63 ▼0.1037.64 ▲1.50
Add New Post /wp-admin/post-new.php6,377 ▲4,85127.53 ▲4.40871.17 ▲187.8134.73 ▼19.15
Media Library /wp-admin/upload.php1,418 ▲154.11 ▼0.0995.76 ▼0.4567.59 ▲25.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_cabgridwidget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cab-grid/cab-grid-compatibility.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cab-grid/cab-grid-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/cab-grid/cab-grid-form-amp.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cab-grid/cab-grid-form.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: You are using too many tags: 40 tag instead of maximum 10
The official readme.txt is a good inspiration

cab-grid/cab-grid.php 92% from 13 tests

The main PHP script in "Cab Grid" version 1.6.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 151 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 plugin2,779 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File67088051,991
PHP58037744
CSS22142
JavaScript2012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin-menu-icon.png0.47KB0.54KB0.00%
chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/icon-128x128.png2.81KB2.24KB▼ 20.12%
chosen-sprite.png0.53KB0.88KB0.00%