84% mcavoy

Code Review | McAvoy

WordPress plugin McAvoy scored 84% from 54 tests.

About plugin

  • Plugin page: mcavoy
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 8
  • Update frequency: every 4.1 days
  • Top authors: stevegrunwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.82ms] Passed 4 tests

This is a short check of server-side resources used by McAvoy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.16 ▼5.98
Dashboard /wp-admin3.39 ▲0.0844.57 ▲1.48
Posts /wp-admin/edit.php3.50 ▲0.1449.74 ▲4.08
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.73 ▼7.93
Media Library /wp-admin/upload.php3.31 ▲0.0833.28 ▲1.17
Site Searches /wp-admin/tools.php?page=mcavoy-searches3.2834.38

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables
wp_mcavoy_searches
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by McAvoy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼1.045.27 ▲3.5342.59 ▲0.31
Dashboard /wp-admin2,207 ▲225.85 ▲0.00107.43 ▲7.1237.33 ▼6.48
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0240.81 ▲0.0534.60 ▼6.10
Add New Post /wp-admin/post-new.php1,545 ▲1118.33 ▼4.82595.34 ▼26.1948.79 ▼2.68
Media Library /wp-admin/upload.php1,389 ▼24.22 ▲0.01100.12 ▼2.0944.70 ▲2.20
Site Searches /wp-admin/tools.php?page=mcavoy-searches9322.0624.5730.77

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function McAvoy\\Caps\\add_action() in wp-content/plugins/mcavoy/inc/caps.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'McAvoy\\Loggers\\Logger' not found in wp-content/plugins/mcavoy/inc/loggers/database.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function McAvoy\\Admin\\add_action() in wp-content/plugins/mcavoy/inc/admin.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function McAvoy\\Admin\\add_action() in wp-content/plugins/mcavoy/inc/admin.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function McAvoy\\add_action() in wp-content/plugins/mcavoy/inc/core.php:26
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mcavoy/inc/class-list-table.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mcavoy/inc/class-list-table.php on line 12
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/mcavoy/inc/class-list-table.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function McAvoy\\Caps\\add_action() in wp-content/plugins/mcavoy/inc/caps.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: tracking, site search, query, search

mcavoy/mcavoy.php Passed 13 tests

"McAvoy" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
Discover what visitors are searching for on your WordPress site.

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
Everything looks great! No dangerous files found in this plugin400 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10124347374
Markdown219025
JavaScript1011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1872.00%
▷ Protected methods728.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected