72% navthemes-landing-pages

Code Review | NavThemes Landing Pages - Free WordPress Landing Pages Plugin

WordPress plugin NavThemes Landing Pages - Free WordPress Landing Pages Plugin scored72%from 54 tests.

About plugin

  • Plugin page: navthemes-landing...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2019
  • Latest release: Jun 26, 2019
  • Number of updates: 7
  • Update frequency: every 14.0 days
  • Top authors: navthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.95MB] [CPU: ▼7.86ms] Passed 4 tests

A check of server-side resources used by NavThemes Landing Pages - Free WordPress Landing Pages Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.2045.80 ▲3.18
Dashboard /wp-admin4.54 ▲1.2453.89 ▲6.80
Posts /wp-admin/edit.php4.58 ▲1.2354.35 ▲4.32
Add New Post /wp-admin/post-new.php6.02 ▲0.1454.60 ▼39.19
Media Library /wp-admin/upload.php4.46 ▲1.2338.78 ▲0.24
Landing Pages /wp-admin/admin.php?page=nt-landing-dash4.3935.86
On Boarding /wp-admin/admin.php?page=nt-landing-onboard4.4138.33
Setting /wp-admin/admin.php?page=acf-options-setting4.5043.06

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 357 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
acf_version
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by NavThemes Landing Pages - Free WordPress Landing Pages Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲28216.02 ▲1.6721.80 ▲20.2443.10 ▼1.70
Dashboard /wp-admin2,279 ▲1116.25 ▲0.59106.09 ▲13.5739.40 ▼3.94
Posts /wp-admin/edit.php2,167 ▲643.01 ▲0.9952.43 ▲16.4036.40 ▲1.36
Add New Post /wp-admin/post-new.php1,633 ▲10018.51 ▼4.60647.13 ▼51.8434.76 ▼34.23
Media Library /wp-admin/upload.php1,503 ▲1005.51 ▲1.29119.32 ▲18.2346.36 ▲5.67
Landing Pages /wp-admin/admin.php?page=nt-landing-dash1,0742.8436.4828.29
On Boarding /wp-admin/admin.php?page=nt-landing-onboard1,2902.9135.3450.69
Setting /wp-admin/admin.php?page=acf-options-setting1,1263.6554.4728.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • acf_version
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/navthemes-landing-pages/navthemes-blocks/carwash/main-form.php
    • > /wp-content/plugins/navthemes-landing-pages/navthemes-blocks/carrepair/main-form.php
    • > /wp-content/plugins/navthemes-landing-pages/navthemes-blocks/cargo/main-form.php
    • > /wp-content/plugins/navthemes-landing-pages/navthemes-blocks/cakes/main-form.php
  • 84× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/navthemes-landing-pages/admin/includes/admin/views/html-admin-tools.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/navthemes-landing-pages/page-viewdashboard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/navthemes-landing-pages/admin/includes/admin/settings-addons.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/navthemes-landing-pages/Template-navthemes.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/navthemes-landing-pages/admin/includes/forms/form-widget.php:40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/navthemes-landing-pages/admin/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-landing-pages/admin/includes/fields/class-acf-field-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-landing-pages/admin/includes/fields/class-acf-field-textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-landing-pages/admin/pro/fields/class-acf-field-repeater.php:5
    • > PHP Notice
      Undefined variable: license in wp-content/plugins/navthemes-landing-pages/admin/pro/admin/views/html-settings-updates.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=acf-options-setting
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=acf-options-setting 351:19 Uncaught TypeError: Cannot set properties of undefined (setting 'onclick')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: coming soon page, landing page, squeeze page, free landing page, email list...

navthemes-landing-pages/navthemes-landing-pages.php 92% from 13 tests

"NavThemes Landing Pages - Free WordPress Landing Pages Plugin" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin101,142 lines of code in 242 files:
LanguageFilesBlank linesComment linesLines of code
PO File2820,80033,63943,399
JavaScript247,6868,58924,463
PHP14615,38519,74818,961
CSS362,58583314,104
JSON600149
SVG218166

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.75
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes115
▷ Abstract classes00.00%
▷ Concrete classes115100.00%
▷ Final classes00.00%
Methods802
▷ Static methods00.00%
▷ Public methods802100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions416
▷ Named functions41599.76%
▷ Anonymous functions10.24%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
49 PNG files occupy 0.76MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
recommendedplugindata/image/installeddone5.png0.70KB0.63KB▼ 10.49%
assets/images/checked.png15.28KB8.60KB▼ 43.69%
assets/images/ninjaform.png4.33KB2.32KB▼ 46.43%
admin/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
assets/thumbs/template-cargo.png71.35KB23.45KB▼ 67.13%