84% airquality-chmu

Code Review | AirQuality CHMU

WordPress plugin AirQuality CHMU scored 84% from 54 tests.

About plugin

  • Plugin page: airquality-chmu
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: May 14, 2019
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: makav1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 712 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▲5.81ms] Passed 4 tests

Analyzing server-side resources used by AirQuality CHMU
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2355.23 ▲5.87
Dashboard /wp-admin4.58 ▲1.2765.45 ▲8.30
Posts /wp-admin/edit.php4.58 ▲1.2267.93 ▲7.81
Add New Post /wp-admin/post-new.php6.17 ▲0.28110.88 ▲7.23
Media Library /wp-admin/upload.php4.58 ▲1.3546.68 ▲2.34

Server storage [IO: ▲0.09MB] [DB: ▲0.23MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AirQuality CHMU
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▼013.32 ▲0.151.97 ▼0.1850.29 ▲9.27
Dashboard /wp-admin2,234 ▲285.16 ▼0.68110.13 ▼2.0182.81 ▲39.64
Posts /wp-admin/edit.php2,114 ▲252.47 ▲0.4340.66 ▼2.4841.93 ▲2.11
Add New Post /wp-admin/post-new.php1,541 ▲723.13 ▼0.06824.98 ▲133.5667.61 ▲13.46
Media Library /wp-admin/upload.php1,415 ▲244.44 ▲0.30106.28 ▼11.0989.48 ▲40.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • chmu_last_update
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • chmu_data
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/airquality-chmu/aq-chmu.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

airquality-chmu/aq-chmu.php 92% from 13 tests

"AirQuality CHMU" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("airquality-chmu.php" instead of "aq-chmu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected191 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions15100.00%
▷ Anonymous functions00.00%
▷ 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
There are no PNG files in this plugin