84% openmat

Code Review | Openmat

WordPress plugin Openmat scored84%from 54 tests.

About plugin

  • Plugin page: openmat
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Dec 28, 2016
  • Latest release: Mar 16, 2018
  • Number of updates: 4
  • Update frequency: every 110.5 days
  • Top authors: esserq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Openmat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.18 ▲1.93
Dashboard /wp-admin3.34 ▲0.0447.99 ▼1.55
Posts /wp-admin/edit.php3.39 ▲0.0446.00 ▼2.04
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.78 ▼27.20
Media Library /wp-admin/upload.php3.26 ▲0.0337.54 ▲1.52
Openmat API /wp-admin/options-general.php?page=openmat-api3.2331.32

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_openmat_calendar
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Openmat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.31 ▼1.061.67 ▼0.3743.69 ▼0.63
Dashboard /wp-admin2,213 ▲225.86 ▲0.9898.93 ▼4.1538.86 ▼1.41
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0036.13 ▼3.2535.76 ▼0.85
Add New Post /wp-admin/post-new.php1,517 ▼217.52 ▼5.32688.56 ▲91.3956.69 ▼2.97
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0696.93 ▼6.0144.28 ▼0.14
Openmat API /wp-admin/options-general.php?page=openmat-api7972.0323.6624.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_openmat_calendar
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/openmat/openmat.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === openmat === )
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can take inspiration from this readme.txt

openmat/openmat.php Passed 13 tests

The main PHP file in "Openmat" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Display your training calendar as a widget.

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
Good job! No executable or dangerous file extensions detected124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13615120
CSS1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin