10% advanced-earthquake-monitor

Code Review | Advanced Earthquake Monitor

WordPress plugin Advanced Earthquake Monitor scored10%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: 6.3.1
  • 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,970 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install 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

Server metrics [RAM: ▼1.74MB] [CPU: ▼53.56ms] Passed 4 tests

A check of server-side resources used by Advanced Earthquake Monitor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.205.78 ▼33.28
Dashboard /wp-admin2.28 ▼1.065.93 ▼55.26
Posts /wp-admin/edit.php2.28 ▼1.085.85 ▼39.93
Add New Post /wp-admin/post-new.php2.28 ▼3.618.16 ▼85.75
Media Library /wp-admin/upload.php2.28 ▼0.955.88 ▼29.15

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_advancedearthquakemonitor
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Earthquake Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.071.64 ▼0.0136.64 ▼7.05
Dashboard /wp-admin2,198 ▲215.66 ▲0.1083.39 ▼15.8740.68 ▼5.04
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0833.46 ▼3.3334.37 ▼1.50
Add New Post /wp-admin/post-new.php1,526 ▼223.19 ▲0.19653.37 ▼56.5351.64 ▼10.68
Media Library /wp-admin/upload.php1,397 ▼34.17 ▲0.0099.30 ▲3.9344.01 ▼0.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > 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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_advancedearthquakemonitor
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: map, list, widget, earthquakes, worldwide...

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

The primary PHP file in "Advanced Earthquake Monitor" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin398 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111252398

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin