90% wp-easy-metrics

Code Review | WP Easy Metrics

WordPress plugin WP Easy Metrics scored90%from 54 tests.

About plugin

  • Plugin page: wp-easy-metrics
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: May 10, 2021
  • Number of updates: 5
  • Update frequency: every 66.6 days
  • Top authors: redlettuce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.30ms] Passed 4 tests

A check of server-side resources used by WP Easy Metrics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.92 ▼0.82
Dashboard /wp-admin3.31 ▲0.0149.11 ▼8.55
Posts /wp-admin/edit.php3.36 ▲0.0149.76 ▲3.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.38 ▼17.37
Media Library /wp-admin/upload.php3.23 ▲0.0133.13 ▼6.47
WP Easy Metrics /wp-admin/options-general.php?page=wp-easy-metrics-settings3.2033.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Easy Metrics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.39 ▼1.0417.69 ▲16.0941.48 ▼0.26
Dashboard /wp-admin2,210 ▲224.86 ▼0.1298.46 ▼12.3642.80 ▼0.43
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0838.73 ▲2.3234.26 ▼1.73
Add New Post /wp-admin/post-new.php1,536 ▲2223.37 ▲5.94656.87 ▼14.8558.35 ▲7.31
Media Library /wp-admin/upload.php1,389 ▲44.23 ▼0.0198.94 ▼3.0345.14 ▲2.38
WP Easy Metrics /wp-admin/options-general.php?page=wp-easy-metrics-settings7942.0524.4026.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-easy-metrics/wp-easy-metrics.php Passed 13 tests

The main file in "WP Easy Metrics" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Adds Google Analytics tracking code to your site easily

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP271050

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
No PNG files were detected