78% hitactivity

Code Review | HITActivity

WordPress plugin HITActivity scored 78% from 54 tests.

About plugin

  • Plugin page: hitactivity
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.8
  • WordPress version: 5.9.2
  • First release: Jun 19, 2021
  • Latest release: Jul 15, 2021
  • Number of updates: 4
  • Update frequency: every 7.0 days
  • Top authors: hitstacks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 154 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼290.90ms] Passed 4 tests

An overview of server-side resources used by HITActivity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0656.55 ▲2.36
Dashboard /wp-admin3.47 ▲0.0632.69 ▼1.06
Posts /wp-admin/edit.php3.69 ▲0.0537.10 ▼3.91
Add New Post /wp-admin/post-new.php6.94 ▼0.0396.79 ▼1,153.25
Media Library /wp-admin/upload.php3.35 ▲0.0426.94 ▼5.38
WPDrone /wp-admin/options-general.php?page=wpdrone3.3927.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
wpdrone_hooks_notify_list

Browser metrics Passed 4 tests

Checking browser requirements for HITActivity
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4616.19 ▲0.246.03 ▼0.132.34 ▼0.38
Dashboard /wp-admin2,897 ▲365.97 ▼0.19121.05 ▼15.50157.20 ▼2.18
Posts /wp-admin/edit.php2,693 ▲83.23 ▼0.0061.06 ▼4.87139.02 ▼7.12
Add New Post /wp-admin/post-new.php1,714 ▼3821.04 ▲0.02429.19 ▼17.57159.70 ▼4.75
Media Library /wp-admin/upload.php1,703 ▲55.50 ▼0.08153.13 ▲11.53188.51 ▼4.83
WPDrone /wp-admin/options-general.php?page=wpdrone1,5422.4954.23115.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • wpdrone_hooks_notify_list

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hitactivity/hitactivity.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hitactivity/views/settings.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hitactivity/notify.php:210

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

hitactivity/hitactivity.php Passed 13 tests

"HITActivity" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Monitor all hooks activities in wordpress.

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
Success! There were no dangerous files found in this plugin390 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39290390

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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
PNG images were not found in this plugin