10% advanced-earthquake-monitor

Code Review | Advanced Earthquake Monitor

WordPress plugin Advanced Earthquake Monitor scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-earthqua...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 5.9.2
  • First release: Dec 19, 2012
  • Latest release: Jun 2, 2016
  • Number of updates: 8
  • Update frequency: every 157.6 days
  • Top authors: volcanodiscovery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,727 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/advanced-earthquake-monitor/AdvancedEarthquakeMonitor.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedEarthquakeMonitor has a deprecated constructor

Server metrics [RAM: ▼2.29MB] [CPU: ▼350.40ms] Passed 4 tests

A check of server-side resources used by Advanced Earthquake Monitor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.444.86 ▼48.11
Dashboard /wp-admin2.09 ▼1.314.95 ▼28.20
Posts /wp-admin/edit.php2.09 ▼1.554.13 ▼33.53
Add New Post /wp-admin/post-new.php2.09 ▼4.884.46 ▼1,291.76
Media Library /wp-admin/upload.php2.09 ▼1.204.09 ▼22.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_advancedearthquakemonitor

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Earthquake Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4015.74 ▼0.016.92 ▲0.642.77 ▲0.29
Dashboard /wp-admin2,895 ▲346.11 ▼0.15119.62 ▼13.20157.93 ▼4.63
Posts /wp-admin/edit.php2,657 ▼343.24 ▼0.0065.17 ▲0.79139.68 ▼5.13
Add New Post /wp-admin/post-new.php1,773 ▲5621.68 ▲0.60441.53 ▼19.40160.29 ▼4.41
Media Library /wp-admin/upload.php1,698 ▼05.52 ▼0.04142.34 ▲3.10183.84 ▼5.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/advanced-earthquake-monitor/AdvancedEarthquakeMonitor.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedEarthquakeMonitor has a deprecated constructor
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_advancedearthquakemonitor

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-earthquake-monitor/AdvancedEarthquakeMonitor.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: map, monitor, widget, worldwide, earthquakes...

advanced-earthquake-monitor/AdvancedEarthquakeMonitor.php 92% from 13 tests

"Advanced Earthquake Monitor" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-earthquake-monitor.php" instead of "AdvancedEarthquakeMonitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin398 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111252398

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity7.86
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected