84% ausmed-document-button

Code Review | Ausmed Document CPD Button

WordPress plugin Ausmed Document CPD Button scored84%from 54 tests.

About plugin

  • Plugin page: ausmed-document-b...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-4.7.5
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Sep 18, 2018
  • Number of updates: 16
  • Update frequency: every 25.3 days
  • Top authors: ausmed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,076 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.70ms] Passed 4 tests

A check of server-side resources used by Ausmed Document CPD Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.64 ▼2.86
Dashboard /wp-admin3.35 ▲0.0551.86 ▼0.87
Posts /wp-admin/edit.php3.47 ▲0.1148.33 ▼8.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.18 ▼10.88
Media Library /wp-admin/upload.php3.28 ▲0.0537.95 ▲2.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Ausmed Document CPD Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.61 ▼0.778.43 ▲6.6541.66 ▼4.44
Dashboard /wp-admin2,213 ▲285.90 ▲0.0599.94 ▼8.4240.27 ▼1.76
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0037.51 ▼3.6434.34 ▼1.50
Add New Post /wp-admin/post-new.php1,518 ▲423.22 ▲5.68668.68 ▼38.0455.46 ▲3.12
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.00102.61 ▼3.4748.65 ▲1.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ausmed-document-button/admin/partials/ausmed-document-button-admin-display.php
    • > /wp-content/plugins/ausmed-document-button/public/partials/ausmed-document-button-public-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("www.ausmed.com/button")
The official readme.txt might help

ausmed-document-button/ausmed-document-button.php Passed 13 tests

The main PHP script in "Ausmed Document CPD Button" version 2.2.0 is automatically included on every request by WordPress
126 characters long description:
This is a WordPress plugin from Ausmed to enable you to document CPD activities from your content by clicking a single button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected235 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12120531173
CSS211034
JavaScript242728

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected