78% pingdar-site-monitoring

Code Review | Pingdar Site Monitoring

WordPress plugin Pingdar Site Monitoring scored 78% from 54 tests.

About plugin

  • Plugin page: pingdar-site-moni...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 5.8.1
  • First release: Sep 13, 2017
  • Latest release: Apr 18, 2018
  • Number of updates: 7
  • Update frequency: every 31.1 days
  • Top authors: pingdar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼156.80ms] Passed 4 tests

This is a short check of server-side resources used by Pingdar Site Monitoring
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1937.26 ▲12.11
Dashboard /wp-admin3.13 ▲0.0849.13 ▲14.83
Posts /wp-admin/edit.php3.24 ▲0.1346.76 ▼2.68
Add New Post /wp-admin/post-new.php5.49 ▲0.0587.21 ▼637.70
Media Library /wp-admin/upload.php3.07 ▲0.0733.83 ▲1.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 1 new option
New WordPress options
pingdar_user_settings

Browser metrics Passed 4 tests

Checking browser requirements for Pingdar Site Monitoring
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,888 ▲29216.49 ▲0.859.69 ▲0.9152.86 ▲0.80
Dashboard /wp-admin3,052 ▲1216.54 ▲0.33138.99 ▼10.58112.01 ▼4.53
Posts /wp-admin/edit.php2,751 ▲122.89 ▲0.2065.46 ▼9.1490.88 ▲1.98
Add New Post /wp-admin/post-new.php1,706 ▲2318.54 ▼0.13359.00 ▼19.41135.02 ▲18.09
Media Library /wp-admin/upload.php1,828 ▲215.35 ▲0.34138.51 ▼27.15111.22 ▼10.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • pingdar_user_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pingdar-site-monitoring/admin/partials/country-code.php
    • > /wp-content/plugins/pingdar-site-monitoring/public/partials/pingdar-public-display.php
    • > /wp-content/plugins/pingdar-site-monitoring/admin/partials/time-zone.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pingdar-site-monitoring/includes/pingdar-admin-hooks.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pingdar-site-monitoring/admin/partials/pingdar-update-form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'PingdarConnection' not found in wp-content/plugins/pingdar-site-monitoring/admin/partials/pingdar-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pingdar-site-monitoring/admin/partials/pingdar-register-form.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

pingdar-site-monitoring/pingdar.php 85% from 13 tests

"Pingdar Site Monitoring" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pingdar-site-monitoring.php" instead of "pingdar.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,549 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP191976961,585
Sass913211570
CSS26347312
JavaScript3194082

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.88
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions8
▷ Named functions8100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bin/pingdarLogoW.png3.87KB2.92KB▼ 24.55%
bin/pingdarPremium.png6.68KB3.66KB▼ 45.30%
bin/pingdarLogo.png5.09KB3.29KB▼ 35.29%