84% grid-avoid-doublets

Code Review | Grid Avoid Doublets

WordPress plugin Grid Avoid Doublets scored84%from 54 tests.

About plugin

  • Plugin page: grid-avoid-doublets
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2016
  • Latest release: Nov 12, 2018
  • Number of updates: 9
  • Update frequency: every 88.1 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /964 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.46ms] Passed 4 tests

An overview of server-side resources used by Grid Avoid Doublets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.53 ▼3.71
Dashboard /wp-admin3.33 ▲0.0344.68 ▼6.92
Posts /wp-admin/edit.php3.38 ▲0.0242.55 ▼6.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.18 ▼4.52
Media Library /wp-admin/upload.php3.25 ▲0.0236.90 ▲1.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Grid Avoid Doublets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.131.78 ▼0.2043.57 ▼2.45
Dashboard /wp-admin2,209 ▲175.07 ▲0.1598.78 ▼14.3039.33 ▲0.31
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0235.13 ▲0.7333.48 ▼2.15
Add New Post /wp-admin/post-new.php1,542 ▲2817.93 ▲0.30585.55 ▼109.0852.37 ▲6.09
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0193.98 ▼1.3644.26 ▲1.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
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 GridAvoidDoublets\\add_action() in wp-content/plugins/grid-avoid-doublets/grid_avoid_doublets.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: landingpage, page, containerist, editor, admin...

grid-avoid-doublets/grid_avoid_doublets.php 92% from 13 tests

The primary PHP file in "Grid Avoid Doublets" version 1.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("grid-avoid-doublets.php" instead of "grid_avoid_doublets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected102 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP231115102

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
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%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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