84% health-report-mexico

Code Review | Health Report Mexico

WordPress plugin Health Report Mexico scored84%from 54 tests.

About plugin

  • Plugin page: health-report-mexico
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Jan 3, 2022
  • Number of updates: 11
  • Update frequency: every 52.6 days
  • Top authors: htmgarcia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Health Report Mexico
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.00 ▼4.97
Dashboard /wp-admin3.31 ▲0.0143.07 ▼1.81
Posts /wp-admin/edit.php3.36 ▲0.0041.46 ▼1.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.93 ▼9.96
Media Library /wp-admin/upload.php3.23 ▲0.0035.29 ▲1.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
hrmex_save_is_admin
hrmex_save_init
hrmex_save_admin_init
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Health Report Mexico
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.55 ▼0.822.03 ▼0.2440.54 ▼13.35
Dashboard /wp-admin2,206 ▲275.80 ▼0.0797.03 ▼12.7041.04 ▼0.32
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0233.36 ▼3.1732.38 ▼3.27
Add New Post /wp-admin/post-new.php1,528 ▲1418.28 ▲0.53665.97 ▼30.5155.93 ▼2.45
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.05100.60 ▼6.6841.95 ▼2.96

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
  • Zombie WordPress options detected upon uninstall: 9 options
    • hrmex_save_init
    • widget_theysaidso_widget
    • hrmex_save_is_admin
    • widget_recent-posts
    • theysaidso_admin_options
    • hrmex_save_admin_init
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/health-report-mexico/health-report-mexico.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: covid, map, mexico, health

health-report-mexico/health-report-mexico.php Passed 13 tests

The main PHP file in "Health Report Mexico" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Display information about COVID-19 cases in Mexico

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
Success! There were no dangerous files found in this plugin39 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2123439
CSS1010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity3.00
▷ Minimum method complexity3.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin