89% visitorlab

Code Review | VisitorLAB

WordPress plugin VisitorLAB scored89%from 54 tests.

About plugin

  • Plugin page: visitorlab
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Jan 22, 2020
  • Number of updates: 8
  • Update frequency: every 12.9 days
  • Top authors: visitorlab (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /630 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.44MB] [CPU: ▲15.09ms] Passed 4 tests

Analyzing server-side resources used by VisitorLAB
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.71 ▼0.38
Dashboard /wp-admin4.00 ▲0.6973.68 ▲25.43
Posts /wp-admin/edit.php4.06 ▲0.7072.53 ▲23.71
Add New Post /wp-admin/post-new.php6.23 ▲0.34108.80 ▲11.60
Media Library /wp-admin/upload.php4.00 ▲0.7763.06 ▲28.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for VisitorLAB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.29 ▼1.091.82 ▼0.1344.02 ▼6.91
Dashboard /wp-admin2,243 ▲526.26 ▲0.36107.65 ▲8.9681.19 ▲35.80
Posts /wp-admin/edit.php2,126 ▲372.38 ▲0.3544.34 ▲3.7430.83 ▼6.02
Add New Post /wp-admin/post-new.php1,552 ▲1918.40 ▼4.84609.67 ▼54.7151.29 ▼6.02
Media Library /wp-admin/upload.php1,423 ▲354.44 ▲0.23101.76 ▲0.9039.49 ▼7.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • visitorlab_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Paste your VisitorLAB tracking code into the text area below for connecting VisitorLAB to your WordPress website, Then enjoy the understanding of your visitor.) image missing
The official readme.txt is a good inspiration

visitorlab/visitorlab.php 92% from 13 tests

The main PHP file in "VisitorLAB" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected235 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35849172
CSS110062
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.50
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods423.53%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/static/icon.png6.08KB3.30KB▼ 45.72%
assets/screenshot_1.png34.88KB14.67KB▼ 57.93%