77% landingcube-for-wordpress

Code Review | LandingCube - Landing Pages for Amazon FBA Sellers

WordPress plugin LandingCube - Landing Pages for Amazon FBA Sellers scored77%from 54 tests.

About plugin

  • Plugin page: landingcube-for-w...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 24, 2018
  • Latest release: Aug 5, 2022
  • Number of updates: 17
  • Update frequency: every 87.2 days
  • Top authors: RyanNovotny (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /2,614 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by LandingCube - Landing Pages for Amazon FBA Sellers
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 902.72ms on /wp-admin/post-new.php?post_type=landingcube_page)
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.52 ▲0.64
Dashboard /wp-admin3.45 ▲0.1549.18 ▼0.48
Posts /wp-admin/edit.php3.57 ▲0.2168.60 ▲19.19
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.86 ▼14.49
Media Library /wp-admin/upload.php3.37 ▲0.1536.10 ▼1.79
Login /wp-admin/edit.php?post_type=landingcube_page&page=fca_lcwp_login_page3.3433.98
Add New /wp-admin/post-new.php?post_type=landingcube_page3.40902.72
All Landing Pages /wp-admin/edit.php?post_type=landingcube_page3.3933.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by LandingCube - Landing Pages for Amazon FBA Sellers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲8014.25 ▼0.011.90 ▼0.0241.67 ▼0.15
Dashboard /wp-admin2,229 ▲585.55 ▼0.1586.51 ▼4.2877.86 ▲35.86
Posts /wp-admin/edit.php2,155 ▲522.00 ▼0.0145.08 ▲5.0350.24 ▲12.05
Add New Post /wp-admin/post-new.php1,565 ▲3923.76 ▲0.92721.83 ▲58.7864.69 ▲15.07
Media Library /wp-admin/upload.php1,449 ▲554.12 ▼0.13102.97 ▲1.5879.63 ▲36.67
Login /wp-admin/edit.php?post_type=landingcube_page&page=fca_lcwp_login_page8492.1624.9843.33
Add New /wp-admin/post-new.php?post_type=landingcube_page1,5182.2925.4933.48
All Landing Pages /wp-admin/edit.php?post_type=landingcube_page1,5972.2827.6535.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/landingcube-for-wordpress/landingcube-wp.php
    • > /wp-content/plugins/landingcube-for-wordpress/languages/index.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/landingcube-for-wordpress/includes/login/login-page.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/landingcube-for-wordpress/includes/landing/landing.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_404() in wp-content/plugins/landingcube-for-wordpress/includes/landing/page_template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/landingcube-for-wordpress/includes/custom-post-type.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/landingcube-for-wordpress/includes/api.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/landingcube-for-wordpress/includes/editor/editor.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (An Amazon coupon landing page built with LandingCube)
The official readme.txt might help

landingcube-for-wordpress/landingcube-wp.php 85% from 13 tests

The primary PHP file in "LandingCube - Landing Pages for Amazon FBA Sellers" version 1.0.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("landingcube-for-wordpress.php" instead of "landingcube-wp.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin947 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP916269628
CSS7163207
JavaScript43016112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.67KB26.68KB0.00%
icon.png0.80KB1.06KB0.00%