93% crisp-grid

Code Review | Crisp Grid

WordPress plugin Crisp Grid scored 93% from 54 tests.

About plugin

  • Plugin page: crisp-grid
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.8.1
  • WordPress version: 5.8.1
  • First release: Aug 26, 2017
  • Latest release: Aug 26, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wppatrickk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 619 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Crisp Grid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2336.44 ▲13.97
Dashboard /wp-admin3.17 ▲0.1245.15 ▲4.33
Posts /wp-admin/edit.php3.22 ▲0.1241.20 ▼2.81
Add New Post /wp-admin/post-new.php5.53 ▲0.1088.87 ▼565.44
Media Library /wp-admin/upload.php3.11 ▲0.1133.41 ▼0.19
Grids /wp-admin/edit.php?post_type=crispgrid3.1636.25
Add New /wp-admin/post-new.php?post_type=crispgrid3.1643.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Crisp Grid
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲23116.75 ▲1.1613.22 ▲4.1348.54 ▼4.56
Dashboard /wp-admin3,008 ▲775.85 ▼0.10134.19 ▼6.66106.32 ▼1.71
Posts /wp-admin/edit.php2,771 ▲322.71 ▲0.0165.37 ▲2.3289.26 ▼2.72
Add New Post /wp-admin/post-new.php1,706 ▲9118.73 ▼2.28362.27 ▲90.63103.74 ▼4.57
Media Library /wp-admin/upload.php1,842 ▲325.01 ▼0.03142.81 ▼2.14120.83 ▲8.21
Grids /wp-admin/edit.php?post_type=crispgrid1,4572.9362.2671.90
Add New /wp-admin/post-new.php?post_type=crispgrid2,6393.5598.54133.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/crisp-grid/inc/crispgrid-shortcode.php:151
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crisp-grid/inc/crispgrid-metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/crisp-grid/crispgrid.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

crisp-grid/crispgrid.php 85% from 13 tests

The entry point to "Crisp Grid" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("crisp-grid.php" instead of "crispgrid.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected872 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP39393416
CSS2550242
PO File14954109
JavaScript213076
Markdown112029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/crispgrid-post-date.png0.84KB0.44KB▼ 48.15%
css/images/crispgrid-post-author.png0.87KB0.75KB▼ 13.74%
css/images/plugin-banner.png5.64KB2.07KB▼ 63.34%
css/images/theme-banner.png5.53KB1.94KB▼ 64.88%
css/images/plugin-support.png3.37KB1.14KB▼ 66.04%