74% plainview-activity-monitor

Code Review | Plainview Activity Monitor

WordPress plugin Plainview Activity Monitor scored74%from 54 tests.

About plugin

  • Plugin page: plainview-activit...
  • Plugin version: 20180826...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 6.3.1
  • First release: May 11, 2014
  • Latest release: Aug 26, 2018
  • Number of updates: 74
  • Update frequency: every 21.2 days
  • Top authors: edward_plainview (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /27,390 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.23MB] [CPU: ▲3.10ms] Passed 4 tests

This is a short check of server-side resources used by Plainview Activity Monitor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.2149.55 ▲6.79
Dashboard /wp-admin4.54 ▲1.2356.07 ▲6.72
Posts /wp-admin/edit.php4.59 ▲1.2354.40 ▲5.49
Add New Post /wp-admin/post-new.php7.12 ▲1.2392.03 ▼6.61
Media Library /wp-admin/upload.php4.46 ▲1.2348.28 ▲14.46

Server storage [IO: ▲0.75MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 328 new files
Database: 1 new table, 11 new options
New tables
wp_pv_am_activities
New WordPress options
Plainview_Activity_Monitor_activities_in_database
Plainview_Activity_Monitor_refresh_timeout
widget_recent-comments
Plainview_Activity_Monitor_wp_login_failed_password
Plainview_Activity_Monitor_debug_ips
theysaidso_admin_options
db_upgraded
widget_recent-posts
Plainview_Activity_Monitor_per_page
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Plainview Activity Monitor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲13813.36 ▼1.041.78 ▲0.0140.27 ▼3.66
Dashboard /wp-admin2,290 ▲1024.98 ▲0.10106.64 ▼1.0839.10 ▼3.69
Posts /wp-admin/edit.php2,173 ▲842.22 ▲0.2134.92 ▼6.0932.41 ▼2.36
Add New Post /wp-admin/post-new.php1,529 ▲1517.80 ▲0.27663.67 ▲15.5459.10 ▼4.84
Media Library /wp-admin/upload.php1,473 ▲824.31 ▲0.12103.53 ▲7.5342.63 ▲1.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_pv_am_activities
  • This plugin does not fully uninstall, leaving 11 options in the database
    • Plainview_Activity_Monitor_refresh_timeout
    • Plainview_Activity_Monitor_activities_in_database
    • Plainview_Activity_Monitor_wp_login_failed_password
    • can_compress_scripts
    • Plainview_Activity_Monitor_per_page
    • widget_recent-posts
    • Plainview_Activity_Monitor_debug_ips
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 204× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\form2\\inputs\\input' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/form2/inputs/legend.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\wordpress\\activity_monitor\\hooks\\hook' not found in wp-content/plugins/plainview-activity-monitor/src/hooks/retrieve_password.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\table\\section' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/table/head.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\tests\\TestCase' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/form2/tests/TestCase.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\form2\\inputs\\text' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/form2/inputs/search.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\wordpress\\activity_monitor\\hooks\\hook' not found in wp-content/plugins/plainview-activity-monitor/src/hooks/upgrader_post_install.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\collections\\collection' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/tree/orphans.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\form2\\inputs\\text' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/form2/inputs/email.php:11
    • > PHP Fatal error
      Trait 'plainview\\sdk_pvam\\html\\element' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/form2/form.php on line 138
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_pvam\\table\\cell' not found in wp-content/plugins/plainview-activity-monitor/src/sdk/table/td.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: logging, activity, activities

plainview-activity-monitor/Plainview_Activity_Monitor.php 85% from 13 tests

The principal PHP file in "Plainview Activity Monitor" v. 20180826... is loaded by WordPress automatically on each request
You should first fix the following items:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "20180826...")
  • Main file name: The principal plugin file should be the same as the plugin slug ("plainview-activity-monitor.php" instead of "Plainview_Activity_Monitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin15,781 lines of code in 316 files:
LanguageFilesBlank linesComment linesLines of code
PHP2783,2817,74912,627
JavaScript123265421,702
CSS29613663
HTML430254
Bourne Shell83015114
Markdown3430104
PO File1404398
JSON40091
SVG11167
XML10042
Sass12016
Bourne Again Shell1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.35
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces46
Interfaces0
Traits61
Classes208
▷ Abstract classes52.40%
▷ Concrete classes20397.60%
▷ Final classes00.00%
Methods1,306
▷ Static methods916.97%
▷ Public methods1,30199.62%
▷ Protected methods30.23%
▷ Private methods20.15%
Functions21
▷ Named functions1047.62%
▷ Anonymous functions1152.38%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin