83% corona-awareness-popup

Code Review | Corona Awareness Popup

WordPress plugin Corona Awareness Popup scored83%from 54 tests.

About plugin

  • Plugin page: corona-awareness-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2020
  • Latest release: May 7, 2021
  • Number of updates: 3
  • Update frequency: every 137.7 days
  • Top authors: eleopard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,813 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.03ms] Passed 4 tests

Analyzing server-side resources used by Corona Awareness Popup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.76 ▼5.77
Dashboard /wp-admin3.38 ▲0.0846.24 ▼2.15
Posts /wp-admin/edit.php3.49 ▲0.1449.22 ▼4.60
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.90 ▼23.59
Media Library /wp-admin/upload.php3.30 ▲0.0736.13 ▼2.11
Corona Awareness /wp-admin/options-general.php?page=edscv-corona-awareness3.3539.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Corona Awareness Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲22913.53 ▼1.0510.93 ▲9.3058.28 ▲13.58
Dashboard /wp-admin2,210 ▲194.87 ▼1.03110.54 ▲11.5338.61 ▼4.43
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0238.41 ▼3.2336.70 ▼1.43
Add New Post /wp-admin/post-new.php1,537 ▲2323.42 ▲5.82659.83 ▼21.3650.44 ▼3.39
Media Library /wp-admin/upload.php1,389 ▼24.22 ▲0.0393.34 ▼7.6040.32 ▼3.50
Corona Awareness /wp-admin/options-general.php?page=edscv-corona-awareness1,6377.09140.7776.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/corona-awareness-popup/templates/popup-body.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
2 plugin tags: covid-19, corona

corona-awareness-popup/edscv-corona.php 77% from 13 tests

This is the main PHP file of "Corona Awareness Popup" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("corona-awareness-popup.php" instead of "edscv-corona.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected543 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP486170332
JavaScript23315126
CSS11085

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.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
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/symptom-headache.png5.10KB3.83KB▼ 24.98%
assets/images/symptom-fever.png4.90KB3.64KB▼ 25.87%
assets/images/preventation-mask.png3.45KB2.31KB▼ 32.94%
assets/images/symptom-sore-cough.png4.84KB3.58KB▼ 26.10%
assets/images/preventation-wash-hands.png3.56KB2.41KB▼ 32.47%