84% notwiz-calendar-block

Code Review | NotWiz Calendar Block

WordPress plugin NotWiz Calendar Block scored84%from 54 tests.

About plugin

  • Plugin page: notwiz-calendar-b...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0.4
  • WordPress version: 6.3.1
  • First release: Jan 27, 2019
  • Latest release: Jan 29, 2019
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: kmix39 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /745 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.24MB] [CPU: ▼16.20ms] Passed 4 tests

This is a short check of server-side resources used by NotWiz Calendar Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.70 ▲5.58
Dashboard /wp-admin3.34 ▲0.0050.36 ▼10.76
Posts /wp-admin/edit.php3.40 ▲0.0448.01 ▼2.24
Add New Post /wp-admin/post-new.php4.86 ▼1.0352.26 ▼54.42
Media Library /wp-admin/upload.php3.27 ▲0.0435.63 ▲2.64

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by NotWiz Calendar Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.26 ▼1.112.14 ▲0.3442.94 ▲0.50
Dashboard /wp-admin2,209 ▲305.90 ▲1.01112.97 ▲5.1642.92 ▼4.45
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0737.35 ▼0.9333.77 ▼2.92
Add New Post /wp-admin/post-new.php6,205 ▲4,67222.04 ▼1.36893.15 ▲210.6075.57 ▲18.21
Media Library /wp-admin/upload.php1,382 ▼34.16 ▼0.0297.60 ▼1.5541.59 ▼1.46

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Not_Wiz\\Calendar\\Block\\plugin_dir_path() in wp-content/plugins/notwiz-calendar-block/notwiz-calendar-block.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

notwiz-calendar-block/notwiz-calendar-block.php Passed 13 tests

The principal PHP file in "NotWiz Calendar Block" v. 1.0.5 is loaded by WordPress automatically on each request
77 characters long description:
This plug-in is a Gutenberg Block on a calendar that supports regular events.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin129 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32724124
CSS2002
JavaScript10102
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin