89% earthquakemonitor

Code Review | Earthquake Monitor

WordPress plugin Earthquake Monitor scored89%from 54 tests.

About plugin

  • Plugin page: earthquakemonitor
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.5.0
  • WordPress version: 6.3.1
  • First release: May 15, 2011
  • Latest release: Apr 1, 2020
  • Number of updates: 47
  • Update frequency: every 69.0 days
  • Top authors: crisvangeel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /5,538 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.14MB] [CPU: ▼3.78ms] Passed 4 tests

Server-side resources used by Earthquake Monitor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.85 ▲3.72
Dashboard /wp-admin3.45 ▲0.1444.59 ▼1.48
Posts /wp-admin/edit.php3.56 ▲0.2040.63 ▼5.78
Add New Post /wp-admin/post-new.php6.03 ▲0.1480.49 ▼9.35
Media Library /wp-admin/upload.php3.37 ▲0.1335.96 ▲1.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: 1 new table, 8 new options
New tables
wp_earthquakewidget
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
earthquake_db_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_earthquakemonitor

Browser metrics Passed 4 tests

This is an overview of browser requirements for Earthquake Monitor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.261.65 ▼0.4145.28 ▼4.29
Dashboard /wp-admin2,197 ▲205.54 ▼0.1286.28 ▼14.8040.19 ▼3.81
Posts /wp-admin/edit.php2,099 ▲22.01 ▲0.0035.11 ▼0.3230.16 ▼4.74
Add New Post /wp-admin/post-new.php1,528 ▼921.48 ▲3.37679.72 ▲63.7156.97 ▼11.72
Media Library /wp-admin/upload.php1,402 ▲24.23 ▼0.0194.79 ▼0.8142.92 ▼0.34

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: widget, geological, monitor, earthquake

earthquakemonitor/EarthquakeMonitor.php 85% from 13 tests

The primary PHP file in "Earthquake Monitor" version 2.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("earthquakemonitor.php" instead of "EarthquakeMonitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected760 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP315674591
PO File15355130
CSS15039

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/tsunami.png0.56KB0.28KB▼ 49.39%