10% landing-page-rockstar

Code Review | Landing Page Rockstar - BETA

WordPress plugin Landing Page Rockstar - BETA scored 10% from 54 tests.

About plugin

  • Plugin page: landing-page-rock...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Aug 29, 2015
  • Latest release: Jan 11, 2017
  • Number of updates: 12
  • Update frequency: every 103.5 days
  • Top authors: dusthazard (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 7,427 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
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/landing-page-rockstar/metabox/init.php+810
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.82ms] Passed 4 tests

An overview of server-side resources used by Landing Page Rockstar - BETA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.86 ▼36.46
Dashboard /wp-admin2.05 ▼1.256.41 ▼40.34
Posts /wp-admin/edit.php2.05 ▼1.306.30 ▼42.06
Add New Post /wp-admin/post-new.php2.05 ▼3.848.11 ▼88.40
Media Library /wp-admin/upload.php2.05 ▼1.186.52 ▼25.72
Landing Page Options /wp-admin/admin.php2.056.10
All Landing Pages /wp-admin/edit.php?post_type=landingpage2.056.31
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=landingpage2.056.29
Add New /wp-admin/post-new.php?post_type=landingpage2.056.12
Group /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage2.0512.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 116 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
category_children
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Landing Page Rockstar - BETA: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲25315.04 ▲0.861.70 ▼0.0039.12 ▼5.30
Dashboard /wp-admin2,391 ▲2036.49 ▲0.58136.19 ▲29.4736.82 ▼5.02
Posts /wp-admin/edit.php2,296 ▲2073.43 ▲1.4256.45 ▲16.4231.73 ▼3.53
Add New Post /wp-admin/post-new.php1,598 ▲20118.63 ▲0.73602.90 ▼19.0933.77 ▼38.49
Media Library /wp-admin/upload.php1,437 ▲524.29 ▲0.0980.39 ▼21.0539.34 ▼3.14
Landing Page Options /wp-admin/admin.php80.440.080.11
All Landing Pages /wp-admin/edit.php?post_type=landingpage1,3613.4347.3027.51
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=landingpage1,6613.2744.5729.79
Add New /wp-admin/post-new.php?post_type=landingpage4,07210.09278.21129.80
Group /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage1,4803.2540.3028.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/landing-page-rockstar/metabox/init.php+810
    count(): Parameter must be an array or an object that implements Countable
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • category_children
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 0% 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)
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage
    • > Warning in wp-content/plugins/landing-page-rockstar/metabox/init.php+810
    count(): Parameter must be an array or an object that implements Countable
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage
    • > Notice in wp-content/plugins/landing-page-rockstar/class/admin.php+771
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=landingpage
    • > Notice in wp-content/plugins/landing-page-rockstar/metabox/helpers/cmb_Meta_Box_types.php+461
    Undefined variable: args
    • > GET request to /wp-admin/post-new.php?post_type=landingpage
    • > Notice in wp-content/plugins/landing-page-rockstar/metabox/helpers/cmb_Meta_Box_types.php+471
    Undefined variable: output

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/landing-page-rockstar/single-landingpage.php
    • > /wp-content/plugins/landing-page-rockstar/landertemplates/admin/landingpage001.php
    • > /wp-content/plugins/landing-page-rockstar/includes/simple.php
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_attachment_image_src() in wp-content/plugins/landing-page-rockstar/landertemplates/template-1_7.php:3
    • > PHP Notice
      Undefined variable: meta_box in wp-content/plugins/landing-page-rockstar/includes/simple.php on line 5
    • > PHP Notice
      Undefined variable: embedcode in wp-content/plugins/landing-page-rockstar/landertemplates/template-3_1.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_thumbnail_id() in wp-content/plugins/landing-page-rockstar/landertemplates/template-1_4.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/landing-page-rockstar/includes/simple.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/landing-page-rockstar/includes/simple.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_thumbnail_id() in wp-content/plugins/landing-page-rockstar/landertemplates/template-2_2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/landing-page-rockstar/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/landing-page-rockstar/landertemplates/template-3_1.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/landing-page-rockstar/includes/metaboxes.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: pickedThemeExt is not defined" "ReferenceError: pickedThemeExt is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/landing-page-rockstar//includes/admin_js.js?ver=0.5:106:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=group&post_type=landingpage
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught ReferenceError: pickedThemeExt is not defined

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: squeeze page, landing page, optin form, generate leads

landing-page-rockstar/lprockstar.php 92% from 13 tests

The entry point to "Landing Page Rockstar - BETA" version 0.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("landing-page-rockstar.php" instead of "lprockstar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected7,571 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,6011,2593,867
JavaScript63523792,268
CSS195153391,436

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity50.18
▷ Minimum class complexity3.00
▷ Maximum class complexity145.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods184
▷ Static methods3418.48%
▷ Public methods17896.74%
▷ Protected methods21.09%
▷ Private methods42.17%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
44 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
landertemplates/images/theme_1_1.png1.04KB0.19KB▼ 81.34%
landertemplates/images/title-side-right3.png6.91KB4.03KB▼ 41.67%
metabox/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
landertemplates/images/theme_2_2.png1.13KB0.16KB▼ 86.11%
landertemplates/images/title-side-right4.png6.85KB4.03KB▼ 41.20%