83% i-divi-post-settings

Code Review | i-Divi Post Settings

WordPress plugin i-Divi Post Settings scored83%from 54 tests.

About plugin

  • Plugin page: i-divi-post-settings
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 19, 2017
  • Latest release: Nov 28, 2018
  • Number of updates: 12
  • Update frequency: every 28.8 days
  • Top authors: dangub86 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /5,617 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.55ms] Passed 4 tests

Analyzing server-side resources used by i-Divi Post Settings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.26 ▲0.25
Dashboard /wp-admin3.31 ▲0.0044.16 ▼3.07
Posts /wp-admin/edit.php3.36 ▲0.0049.85 ▼2.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.51 ▲1.07
Media Library /wp-admin/upload.php3.23 ▲0.0035.53 ▼0.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for i-Divi Post Settings
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.381.65 ▲0.0237.35 ▼10.05
Dashboard /wp-admin2,209 ▲245.89 ▲1.0098.73 ▼15.7037.60 ▼0.93
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0739.41 ▲0.2034.53 ▼0.78
Add New Post /wp-admin/post-new.php1,528 ▼518.32 ▼4.89614.49 ▼70.8756.94 ▲0.59
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0196.35 ▼2.9441.89 ▼3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/i-divi-post-settings/i_divi_post_settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #5 (Divi Product Settings in Theme Customizer), #6 (Divi Visual Settings), #7 (Divi Default edictor Settings)
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

i-divi-post-settings/i_divi_post_settings.php 92% from 13 tests

The main PHP file in "i-Divi Post Settings" ver. 1.3.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("i-divi-post-settings.php" instead of "i_divi_post_settings.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
Success! There were no dangerous files found in this plugin980 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7178270953
CSS12314
JavaScript15013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.40
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity5.46
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin