77% moosend-landing-pages

Code Review | Moosend Landing Pages

WordPress plugin Moosend Landing Pages scored77%from 54 tests.

About plugin

  • Plugin page: moosend-landing-p...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2020
  • Latest release: Sep 25, 2023
  • Number of updates: 22
  • Update frequency: every 60.3 days
  • Top authors: moosend (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,970 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Moosend Landing Pages
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 508.27ms on /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landing-importer)
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1142.46 ▲1.01
Dashboard /wp-admin3.43 ▲0.1250.37 ▲1.05
Posts /wp-admin/edit.php3.54 ▲0.1847.63 ▲3.85
Add New Post /wp-admin/post-new.php6.07 ▲0.1785.29 ▼20.02
Media Library /wp-admin/upload.php3.35 ▲0.1237.68 ▼0.48
Import to WordPress /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landing-importer3.36508.27
Connect /wp-admin/edit.php?post_type=moosend_landing&page=moosend-authentication3.3334.45
Settings /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landings-settings3.3232.99
Landing Pages /wp-admin/edit.php?post_type=moosend_landing3.41258.77

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Moosend Landing Pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.14 ▼0.381.82 ▲0.0444.00 ▼0.80
Dashboard /wp-admin2,255 ▲785.52 ▼0.1482.65 ▼18.2667.01 ▲22.70
Posts /wp-admin/edit.php2,158 ▲551.99 ▼0.0235.14 ▼0.3537.44 ▲7.98
Add New Post /wp-admin/post-new.php1,505 ▼4516.52 ▼1.92601.35 ▼45.5550.56 ▼14.65
Media Library /wp-admin/upload.php1,457 ▲604.23 ▲0.0298.13 ▼6.7471.59 ▲29.72
Import to WordPress /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landing-importer1,0282.1627.2034.83
Connect /wp-admin/edit.php?post_type=moosend_landing&page=moosend-authentication1,0411.9922.4842.78
Settings /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landings-settings8512.0527.1532.62
Landing Pages /wp-admin/edit.php?post_type=moosend_landing1,1311.9632.3531.01

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=moosend_landing&page=moosend-landing-importer
    • > Notice in wp-content/plugins/moosend-landing-pages/views/importer-page.php+116
    Trying to access array offset on value of type null

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/moosend-landing-pages/views/auth-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/moosend-landing-pages/views/importer-page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

moosend-landing-pages/index.php 85% from 13 tests

Analyzing the main PHP file in "Moosend Landing Pages" version 1.1.6
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("moosend-landing-pages.php" instead of "index.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin883 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74477722
SVG101161

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/no-landings.png6.57KB3.88KB▼ 40.94%
assets/img/moo-favicon.png2.50KB1.03KB▼ 58.74%