74% leafly-reviews

Code Review | Leafly Reviews for WordPress

WordPress plugin Leafly Reviews for WordPress scored74%from 54 tests.

About plugin

  • Plugin page: leafly-reviews
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Dec 8, 2016
  • Number of updates: 7
  • Update frequency: every 60.0 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.69MB] [CPU: ▼56.54ms] Passed 4 tests

This is a short check of server-side resources used by Leafly Reviews for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.155.58 ▼33.39
Dashboard /wp-admin2.33 ▼1.017.41 ▼54.24
Posts /wp-admin/edit.php2.33 ▼1.026.42 ▼40.05
Add New Post /wp-admin/post-new.php2.33 ▼3.556.81 ▼98.46
Media Library /wp-admin/upload.php2.33 ▼0.909.62 ▼26.95
Leafly Reviews /wp-admin/options-general.php?page=leafly_reviews2.336.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_leaflyreviews_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Leafly Reviews for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.27 ▼0.731.77 ▼0.0345.56 ▲3.80
Dashboard /wp-admin2,230 ▲245.90 ▲1.03101.78 ▼3.8441.11 ▼0.46
Posts /wp-admin/edit.php2,109 ▲92.04 ▲0.0837.71 ▲1.1434.93 ▼1.74
Add New Post /wp-admin/post-new.php1,531 ▼017.41 ▼6.12694.29 ▲35.7859.95 ▼2.54
Media Library /wp-admin/upload.php1,406 ▲34.36 ▲0.14115.71 ▲16.4948.50 ▲4.51
Leafly Reviews /wp-admin/options-general.php?page=leafly_reviews8112.0523.7526.93

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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/leafly-reviews/includes/widget.php+98
    Methods with the same name as their class will not be constructors in a future version of PHP; leaflyreviews_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_leaflyreviews_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=leafly_reviews
    • > Deprecated in wp-content/plugins/leafly-reviews/includes/widget.php+98
    Methods with the same name as their class will not be constructors in a future version of PHP; leaflyreviews_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=leafly_reviews
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in leaflyreviews_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: shortcode, reviews, leafly, widget

leafly-reviews/leafly-reviews.php Passed 13 tests

The main PHP file in "Leafly Reviews for WordPress" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
65 characters long description:
Easily display your leafly dispensary reviews on your own website

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
Everything looks great! No dangerous files found in this plugin466 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6137235434
CSS2121632

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1676.19%
▷ Protected methods00.00%
▷ Private methods523.81%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin