68% collage-for-divi

Code Review | Divi Collage

WordPress plugin Divi Collage scored68%from 54 tests.

About plugin

  • Plugin page: collage-for-divi
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: May 5, 2019
  • Latest release: Apr 9, 2022
  • Number of updates: 5
  • Update frequency: every 214.4 days
  • Top authors: munirkamal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /7,338 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.58MB] [CPU: ▲21.49ms] 75% from 4 tests

Analyzing server-side resources used by Divi Collage
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,685.77ms on /wp-admin/admin.php?page=collage-for-divi)
PageMemory (MB)CPU Time (ms)
Home /8.49 ▲4.9862.81 ▲16.68
Dashboard /wp-admin8.51 ▲5.1680.41 ▲28.55
Posts /wp-admin/edit.php8.51 ▲5.1185.49 ▲32.67
Add New Post /wp-admin/post-new.php8.98 ▲3.05124.10 ▲8.05
Media Library /wp-admin/upload.php8.51 ▲5.2476.54 ▲38.51
Divi Collage /wp-admin/admin.php?page=collage-for-divi8.511,685.77
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5157.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 174 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
fs_gdpr
theysaidso_admin_options
can_compress_scripts
db_upgraded
fs_debug_mode
widget_recent-comments
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for Divi Collage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.24 ▼0.471.64 ▲0.0231.32 ▼15.86
Dashboard /wp-admin2,215 ▲385.52 ▼0.0187.56 ▲1.9043.62 ▲4.30
Posts /wp-admin/edit.php2,121 ▲212.00 ▼0.0242.21 ▲0.2536.91 ▲0.15
Add New Post /wp-admin/post-new.php1,548 ▲2218.38 ▼4.60676.42 ▲9.9486.14 ▲34.30
Media Library /wp-admin/upload.php1,423 ▲204.22 ▲0.03106.21 ▼8.2052.58 ▲2.41
Divi Collage /wp-admin/admin.php?page=collage-for-divi1,0232.1926.5047.24
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0571.6623.7632.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/collage-for-divi/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • fs_active_plugins
    • can_compress_scripts
    • fs_gdpr
    • fs_accounts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/collage-for-divi/includes/PhotoCollage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/collage-for-divi/includes/modules/photo-collage/photo-collage.php:3

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: gallery, collage, divi module, divi, divi addon

collage-for-divi/photo-collage.php 92% from 13 tests

The main file in "Divi Collage" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("collage-for-divi.php" instead of "photo-collage.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected31,746 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP1117,39216,16231,293
Markdown1680214
JavaScript53459196
JSON10027
CSS130016

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity88.09
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,136
▷ Static methods17315.23%
▷ Public methods79670.07%
▷ Protected methods151.32%
▷ Private methods32528.61%
Functions95
▷ Named functions95100.00%
▷ Anonymous functions00.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/collage-for-divi.png8.86KB3.42KB▼ 61.44%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%