78% leafly-menu-embed

Code Review | Leafly Menu for WordPress

WordPress plugin Leafly Menu for WordPress scored 78% from 54 tests.

About plugin

  • Plugin page: leafly-menu-embed
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Jun 18, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bmoredrew (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 1,522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Leafly Menu for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0073.68 ▲1.21
Dashboard /wp-admin3.31 ▲0.0084.88 ▼9.78
Posts /wp-admin/edit.php3.36 ▲0.0081.44 ▼4.30
Add New Post /wp-admin/post-new.php5.89 ▲0.00155.66 ▼5.51
Media Library /wp-admin/upload.php3.23 ▲0.0060.38 ▼13.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Leafly Menu for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.41 ▲0.403.46 ▼0.2273.26 ▼2.44
Dashboard /wp-admin2,206 ▲245.88 ▼0.02175.33 ▼10.8877.65 ▼9.16
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0666.29 ▼0.3483.60 ▲19.21
Add New Post /wp-admin/post-new.php1,397 ▼1417.47 ▼0.39953.11 ▲4.2682.28 ▼8.51
Media Library /wp-admin/upload.php1,379 ▼34.17 ▲0.01185.64 ▲9.66121.19 ▲23.89

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/leafly-menu-embed/views/leafly-menu.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/leafly-menu-embed/views/leafly-menu.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: menu, leafly

leafly-menu-embed/leafly-menu-wordpress.php 92% from 13 tests

The main PHP file in "Leafly Menu for WordPress" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("leafly-menu-embed.php" instead of "leafly-menu-wordpress.php")

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 plugin26 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP282214
Markdown18012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png34.97KB13.56KB▼ 61.24%