10% flexible-genesis-cta

Code Review | Flexible Genesis CTA

WordPress plugin Flexible Genesis CTA scored 10% from 54 tests.

About plugin

  • Plugin page: flexible-genesis-cta
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 5.9.2
  • First release: Oct 1, 2014
  • Latest release: Oct 2, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: James Roberts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 884 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/flexible-genesis-cta/flexible-cta.php+24
    Function create_function() is deprecated

Server metrics [RAM: ▼2.47MB] [CPU: ▼343.95ms] Passed 4 tests

A check of server-side resources used by Flexible Genesis CTA
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.90 ▼1.614.38 ▼52.43
Dashboard /wp-admin1.92 ▼1.493.74 ▼29.34
Posts /wp-admin/edit.php1.92 ▼1.724.01 ▼31.51
Add New Post /wp-admin/post-new.php1.92 ▼5.053.83 ▼1,262.52
Media Library /wp-admin/upload.php1.92 ▼1.383.78 ▼22.08
Install Plugins /wp-admin/themes.php?page=install-required-plugins1.934.06

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options
widget_lp-cta

Browser metrics Passed 4 tests

An overview of browser requirements for Flexible Genesis CTA
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲8016.46 ▲1.105.53 ▼1.312.18 ▼0.77
Dashboard /wp-admin2,963 ▲1096.81 ▲0.61116.54 ▼19.88167.54 ▲5.81
Posts /wp-admin/edit.php2,772 ▲783.21 ▼0.0371.45 ▲10.48176.12 ▲33.74
Add New Post /wp-admin/post-new.php1,744 ▲5818.38 ▼1.19397.07 ▼16.04157.95 ▲1.00
Media Library /wp-admin/upload.php1,776 ▲755.91 ▲0.41139.57 ▼5.93202.19 ▲11.81
Install Plugins /wp-admin/themes.php?page=install-required-plugins1,2272.9357.01108.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/flexible-genesis-cta/flexible-cta.php+24
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_lp-cta

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=install-required-plugins
    • > Deprecated in wp-content/plugins/flexible-genesis-cta/flexible-cta.php+24
    Function create_function() is deprecated
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=install-required-plugins
    • > Warning in wp-content/plugins/flexible-genesis-cta/inc/plugins/plugins.php+82
    Use of undefined constant CHILD_DOMAIN - assumed 'CHILD_DOMAIN' (this will throw an Error in a future version of PHP)

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/flexible-genesis-cta/views/widget.php
    • > /wp-content/plugins/flexible-genesis-cta/inc/plugins/plugins.php
  • 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 114
    • > PHP Notice
      Undefined variable: img_alt in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 89
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 82
    • > PHP Notice
      Undefined variable: bg_col in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 94
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 96
    • > PHP Notice
      Undefined variable: button_text in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 118
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexible-genesis-cta/views/widget.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please add at least on tag
You can take inspiration from this readme.txt

flexible-genesis-cta/flexible-cta.php 92% from 13 tests

The main file in "Flexible Genesis CTA" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("flexible-genesis-cta.php" instead of "flexible-cta.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
Good job! No executable or dangerous file extensions detected1,505 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP54539171,379
CSS46188
JavaScript24038

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity43.60
▷ Minimum class complexity10.00
▷ Maximum class complexity116.00
Average method complexity5.35
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods4387.76%
▷ Protected methods612.24%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/img/image-placement-bottom.png3.49KB0.33KB▼ 90.60%
views/img/content-button.png3.45KB0.34KB▼ 90.23%
views/img/image-content-button.png3.92KB0.46KB▼ 88.24%
views/img/image-placement-middle.png3.50KB0.35KB▼ 89.88%
views/img/image-placement-top.png3.25KB0.30KB▼ 90.82%