77% mrkwp-footer-for-divi

Code Review | Footer Plugin for Divi

WordPress plugin Footer Plugin for Divi scored 77% from 54 tests.

About plugin

  • Plugin page: mrkwp-footer-for-...
  • Plugin version: 3.3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.3
  • WordPress version: 5.9.2
  • First release: Jun 28, 2019
  • Latest release: Dec 10, 2019
  • Number of updates: 6
  • Update frequency: every 27.5 days
  • Top authors: diviframework (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 5,403 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.23MB] [CPU: ▼275.50ms] 75% from 4 tests

Server-side resources used by Footer Plugin for Divi
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,357.13ms on /wp-admin/admin.php?page=divi-footer-selector)
PageMemory (MB)CPU Time (ms)
Home /8.14 ▲4.6270.39 ▲16.48
Dashboard /wp-admin8.16 ▲4.7559.24 ▲20.51
Posts /wp-admin/edit.php8.16 ▲4.5258.28 ▲16.77
Add New Post /wp-admin/post-new.php10.02 ▲3.05108.09 ▼1,152.23
Media Library /wp-admin/upload.php8.16 ▲4.8644.34 ▲16.99
Freemius Debug [v.2.3.1] /wp-admin/admin.php?page=freemius8.1650.37
Contact /wp-admin/admin.php?page=divi-footer-selector-contact8.1642.45
MRK WP /wp-admin/admin.php?page=df-hub-v28.1643.13
Divi Global Footer /wp-admin/admin.php?page=divi-footer-selector8.161,357.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 237 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_active_plugins
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

An overview of browser requirements for Footer Plugin for Divi
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,848 ▲10615.96 ▲0.337.24 ▼1.342.24 ▼0.02
Dashboard /wp-admin2,973 ▲1126.19 ▼0.01116.70 ▼22.46175.72 ▲12.90
Posts /wp-admin/edit.php2,771 ▲803.25 ▲0.0263.36 ▼1.65154.28 ▲8.90
Add New Post /wp-admin/post-new.php1,671 ▼4820.01 ▼2.71402.68 ▼7.41146.04 ▼11.81
Media Library /wp-admin/upload.php1,781 ▲835.69 ▲0.23145.83 ▲1.76203.73 ▲17.24
Freemius Debug [v.2.3.1] /wp-admin/admin.php?page=freemius1,4992.4657.34129.48
Contact /wp-admin/admin.php?page=divi-footer-selector-contact2,0994.6396.98146.57
MRK WP /wp-admin/admin.php?page=df-hub-v21,0772.4254.36129.06
Divi Global Footer /wp-admin/admin.php?page=divi-footer-selector1,2902.4554.57169.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins

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 | 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mrkwp-footer-for-divi/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/mrkwp-footer-for-divi/vendor/mrkdevelopment/diviframework-hub-v2/views/landing.php
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/mrkwp-footer-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mrkwp-footer-for-divi/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: product_name in wp-content/plugins/mrkwp-footer-for-divi/resources/views/admin/zoho-support-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/mrkwp-footer-for-divi/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mrkwp-footer-for-divi/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php:34
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/mrkwp-footer-for-divi/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: product_name in wp-content/plugins/mrkwp-footer-for-divi/vendor/mrkdevelopment/diviframework-hub-v2/views/zoho-ticket-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/mrkwp-footer-for-divi/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/mrkwp-footer-for-divi/resources/views/admin/zoho-support-form.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/mrkwp-footer-for-divi/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: diviframework, footer

mrkwp-footer-for-divi/mrkwp-footer-for-divi.php 85% from 13 tests

The principal PHP file in "Footer Plugin for Divi" v. 3.3.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin47,926 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1497,30316,67130,830
PO File126,9518,44415,222
CSS12202601,330
JSON400202
JavaScript33459194
reStructuredText19413597
YAML15035
XML11013
Markdown1203

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,710)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity49.77
▷ Minimum class complexity1.00
▷ Maximum class complexity2,710.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces10
Interfaces4
Traits0
Classes76
▷ Abstract classes22.63%
▷ Concrete classes7497.37%
▷ Final classes22.70%
Methods1,258
▷ Static methods17814.15%
▷ Public methods92273.29%
▷ Protected methods151.19%
▷ Private methods32125.52%
Functions164
▷ Named functions9557.93%
▷ Anonymous functions6942.07%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.45MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png32.92KB33.29KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/mrkwp-footer-for-divi.png13.69KB7.21KB▼ 47.37%
assets/banner-1544x500.png154.33KB163.23KB0.00%
assets/icon-128x128.png5.23KB3.03KB▼ 42.09%