87% advanced-custom-types-for-divi

Code Review | Divi Advanced Custom Types

WordPress plugin Divi Advanced Custom Types scored 87% from 54 tests.

About plugin

  • Plugin page: advanced-custom-t...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.9
  • WordPress version: 5.9.2
  • First release: Jul 3, 2019
  • Latest release: Jul 22, 2019
  • Number of updates: 19
  • Update frequency: every 1.1 days
  • Top authors: capellopablo (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 2,846 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.37MB] [CPU: ▼272.73ms] Passed 4 tests

A check of server-side resources used by Divi Advanced Custom Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0354.38 ▲4.83
Dashboard /wp-admin3.22 ▼0.1819.96 ▼13.38
Posts /wp-admin/edit.php3.28 ▼0.3621.16 ▼14.86
Add New Post /wp-admin/post-new.php6.10 ▼0.87203.26 ▼1,052.61
Media Library /wp-admin/upload.php3.25 ▼0.0519.27 ▼10.06

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Divi Advanced Custom Types
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲7815.92 ▲0.297.26 ▲1.462.49 ▲0.31
Dashboard /wp-admin2,915 ▲576.23 ▲0.08115.67 ▼14.45181.80 ▲14.72
Posts /wp-admin/edit.php2,715 ▲242.98 ▼0.2667.86 ▲3.68142.94 ▼0.87
Add New Post /wp-admin/post-new.php1,709 ▼4321.08 ▲0.05469.06 ▲13.75182.84 ▲23.12
Media Library /wp-admin/upload.php1,719 ▲215.51 ▲0.03148.78 ▲5.35225.36 ▲37.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/advanced-custom-types-for-divi/trunk/public/partials/act-divi-public-display.php
    • > /wp-content/plugins/advanced-custom-types-for-divi/admin/partials/act-divi-admin-display.php
    • > /wp-content/plugins/advanced-custom-types-for-divi/public/partials/act-divi-public-display.php
    • > /wp-content/plugins/advanced-custom-types-for-divi/trunk/admin/partials/act-divi-admin-display.php
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/ACTPostTypeGrid.php:3
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/advanced-custom-types-for-divi/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 17
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/advanced-custom-types-for-divi/includes/modules/ACTPostTypeGrid/layouts/ACTPostFullWidth.php:3
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-custom-types-for-divi/trunk/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 17
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/advanced-custom-types-for-divi/includes/modules/ACTPostTypeGrid/layouts/cards.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/advanced-custom-types-for-divi/includes/modules/ACTPostTypeGrid/layouts/cards.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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: Please take inspiration from this readme.txt

advanced-custom-types-for-divi/advanced-custom-types-divi.php 85% from 13 tests

The entry point to "Divi Advanced Custom Types" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-custom-types-for-divi.php" instead of "advanced-custom-types-divi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,062 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP235131,0052,187
Markdown12120453
PO File2182224416
CSS20104
JavaScript2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.22
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods120
▷ Static methods1915.83%
▷ Public methods10890.00%
▷ Protected methods00.00%
▷ Private methods1210.00%
Functions16
▷ Named functions1275.00%
▷ Anonymous functions425.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/Icon-30x30.png4.13KB0.63KB▼ 84.62%