94% landing-page-settings-for-genesis

Code Review | Landing Page Settings for Genesis

WordPress plugin Landing Page Settings for Genesis scored 94% from 54 tests.

About plugin

  • Plugin page: landing-page-sett...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.1
  • WordPress version: 5.8.1
  • First release: Mar 25, 2017
  • Latest release: Feb 25, 2019
  • Number of updates: 9
  • Update frequency: every 78.0 days
  • Top authors: varun21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 947 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Landing Page Settings for Genesis
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0036.39 ▼2.27
Dashboard /wp-admin3.06 ▲0.0046.33 ▲4.56
Posts /wp-admin/edit.php3.11 ▲0.0048.52 ▲13.53
Add New Post /wp-admin/post-new.php5.42 ▼0.01102.50 ▼560.00
Media Library /wp-admin/upload.php3.00 ▼0.0135.12 ▼4.22

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Landing Page Settings for Genesis
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8216.14 ▲0.657.60 ▼0.6952.50 ▲2.28
Dashboard /wp-admin2,973 ▲365.86 ▼0.09149.91 ▲5.76126.90 ▲9.80
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0168.44 ▲1.4988.64 ▼1.09
Add New Post /wp-admin/post-new.php1,683 ▼018.68 ▼0.10406.45 ▲7.88117.33 ▲11.29
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.03167.86 ▲13.84124.41 ▼2.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant GLPS_PLUGIN_DIR - assumed 'GLPS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/landing-page-settings-for-genesis/functions/glps-mobile-detection.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/landing-page-settings-for-genesis/admin/glps-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/landing-page-settings-for-genesis/functions/glps-functions.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/landing-page-settings-for-genesis/landing-page-settings-for-genesis.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Mobile_Detect' not found in wp-content/plugins/landing-page-settings-for-genesis/functions/glps-mobile-detection.php:19
    • > PHP Warning
      include_once(GLPS_PLUGIN_DIRfunctions/mobile-detect.php): failed to open stream: No such file or directory in wp-content/plugins/landing-page-settings-for-genesis/functions/glps-mobile-detection.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/landing-page-settings-for-genesis/admin/glps-lp-settings-regular.php:17
    • > PHP Warning
      include_once(): Failed opening 'GLPS_PLUGIN_DIRfunctions/mobile-detect.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/landing-page-settings-for-genesis/functions/glps-mobile-detection.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/landing-page-settings-for-genesis/admin/glps-lp-settings-mobile.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: Please take inspiration from this readme.txt

landing-page-settings-for-genesis/landing-page-settings-for-genesis.php 92% from 13 tests

"Landing Page Settings for Genesis" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin1,702 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP75659281,657
CSS1121327
JavaScript13018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity69.00
▷ Minimum class complexity15.00
▷ Maximum class complexity123.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods922.50%
▷ Public methods3895.00%
▷ Protected methods25.00%
▷ Private methods00.00%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants535.71%
▷ Class constants964.29%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.25MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/regular-viewport.png108.48KB34.22KB▼ 68.46%
screenshots/mobile-viewport.png145.44KB44.83KB▼ 69.18%