62% serengeti-builders

Code Review | SERENGETI BUILDERS POST GRID - SPG

WordPress plugin SERENGETI BUILDERS POST GRID - SPG scored 62% from 54 tests.

About plugin

  • Plugin page: serengeti-builders
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.13-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: Jan 4, 2020
  • Number of updates: 17
  • Update frequency: every 1.1 days
  • Top authors: mwanri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 711 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.69MB] [CPU: ▼31.18ms] Passed 4 tests

Analyzing server-side resources used by SERENGETI BUILDERS POST GRID - SPG
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2739.87 ▼4.35
Dashboard /wp-admin3.25 ▼0.0528.33 ▼19.91
Posts /wp-admin/edit.php3.25 ▼0.1123.14 ▼25.99
Add New Post /wp-admin/post-new.php3.25 ▼2.6423.77 ▼72.66
Media Library /wp-admin/upload.php3.25 ▲0.0227.05 ▼6.14
SerengetiGrid /wp-admin/admin.php?page=sgrid-dashboard3.2523.82
Settings /wp-admin/admin.php?page=spg-settings3.2525.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SERENGETI BUILDERS POST GRID - SPG
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.62 ▼0.661.60 ▼0.8836.39 ▼11.36
Dashboard /wp-admin2,217 ▲265.91 ▲0.01109.59 ▼0.1478.15 ▲34.14
Posts /wp-admin/edit.php2,112 ▲202.00 ▼0.0533.25 ▼4.6032.66 ▲1.23
Add New Post /wp-admin/post-new.php1,690 ▲15722.28 ▼0.86684.20 ▲15.7957.05 ▲3.51
Media Library /wp-admin/upload.php1,411 ▲234.21 ▲0.03106.15 ▼2.6376.51 ▲30.52
SerengetiGrid /wp-admin/admin.php?page=sgrid-dashboard8112.0123.9026.16
Settings /wp-admin/admin.php?page=spg-settings1,5542.0724.3726.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=spg-settings
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
    • > GET request to /wp-admin/admin.php?page=sgrid-dashboard
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method sgPlugin_ui_dashboard::load_dashboard() should not be called statically
    • > GET request to /wp-admin/admin.php?page=spg-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method sgPlugin_ui_settings::load_settings() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=spg-settings
    • > Notice in wp-content/plugins/serengeti-builders/pcm_wp_list_table.php+37
    Undefined index: entry
    • > GET request to /wp-admin/admin.php?page=spg-settings
    • > Notice in wp-content/plugins/serengeti-builders/pcm_wp_list_table.php+201
    Undefined index: s
    • > GET request to /wp-admin/admin.php?page=spg-settings
    • > Notice in wp-content/plugins/serengeti-builders/pcm_wp_list_table.php+121
    Undefined index: customvar

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/serengeti-builders/serengeti_builders.php
    • > /wp-content/plugins/serengeti-builders/updategrid.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/serengeti-builders/get_grid_data.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/serengeti-builders/pcm_wp_list_table.php:3
    • > PHP Notice
      Undefined variable: frm in wp-content/plugins/serengeti-builders/updategrid.php on line 35

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: serengeti post grid, post grid, postgrid

serengeti-builders/serengeti_builders.php 92% from 13 tests

The principal PHP file in "SERENGETI BUILDERS POST GRID - SPG" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("serengeti-builders.php" instead of "serengeti_builders.php")

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
Everything looks great! No dangerous files found in this plugin14,366 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,026
CSS31,506263,388
PHP75532481,952

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.17
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods3697.30%
▷ Protected methods12.70%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
11 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/coconutthumbsample.png7.54KB2.51KB▼ 66.73%
images/logo.png4.93KB1.79KB▼ 63.56%
images/mangothumbsample.png12.43KB5.23KB▼ 57.92%
images/favicon.png3.67KB0.97KB▼ 73.50%
images/screenshot-1.png11.83KB4.37KB▼ 63.02%