73% gm-adaptive-css-grid-columns

Code Review | GM Adaptive CSS Grid Columns

WordPress plugin GM Adaptive CSS Grid Columns scored73%from 54 tests.

About plugin

  • Plugin page: gm-adaptive-css-g...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Aug 10, 2023
  • Number of updates: 20
  • Update frequency: every 7.0 days
  • Top authors: orionaselite (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /270 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.35MB] [CPU: ▼3.71ms] Passed 4 tests

Server-side resources used by GM Adaptive CSS Grid Columns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3752.55 ▲16.23
Dashboard /wp-admin3.65 ▲0.3558.78 ▲9.66
Posts /wp-admin/edit.php3.70 ▲0.3545.53 ▼4.15
Add New Post /wp-admin/post-new.php6.26 ▲0.3881.76 ▼27.08
Media Library /wp-admin/upload.php3.58 ▲0.3537.94 ▲6.72

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GM Adaptive CSS Grid Columns
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.324.36 ▲2.4844.70 ▲3.88
Dashboard /wp-admin2,226 ▲385.83 ▲0.9399.24 ▼7.3739.70 ▼0.75
Posts /wp-admin/edit.php2,109 ▲202.01 ▼0.0533.45 ▼7.9433.24 ▼2.66
Add New Post /wp-admin/post-new.php1,534 ▲1417.75 ▼5.37690.09 ▲80.6954.49 ▲2.01
Media Library /wp-admin/upload.php1,414 ▲264.26 ▼0.1694.32 ▼3.9540.57 ▼4.00

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Block/AtRootBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Formatter/Expanded.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Formatter/Compact.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Block/ElseBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Block/EachBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/gm-adaptive-css-grid-columns/vendor/scssphp/scssphp/src/Formatter/Compressed.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Requires at least: Version not formatted correctly
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

gm-adaptive-css-grid-columns/gm-adaptive-css-grid-columns.php Passed 13 tests

The principal PHP file in "GM Adaptive CSS Grid Columns" v. 1.0.4 is loaded by WordPress automatically on each request
92 characters long description:
GM Adaptive CSS Grid Columns is a plugin that allows you to create Adaptive CSS Grid Columns

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/gm-adaptive-css-grid-columns/vendor/bin/pscss.bat
13,369 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP693,6016,12312,489
PO File5208301522
JSON300211
Sass310664
Markdown228063
CSS23315
DOS Batch1005
JavaScript12150

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,493)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity46.26
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity5.45
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces12
Interfaces2
Traits0
Classes56
▷ Abstract classes23.57%
▷ Concrete classes5496.43%
▷ Final classes47.41%
Methods571
▷ Static methods518.93%
▷ Public methods21437.48%
▷ Protected methods30553.42%
▷ Private methods529.11%
Functions50
▷ Named functions2346.00%
▷ Anonymous functions2754.00%
Constants78
▷ Global constants67.69%
▷ Class constants7292.31%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin