84% school-governor-block-by-itchyrobot

Code Review | School Governor Block

WordPress plugin School Governor Block scored 84% from 54 tests.

About plugin

  • Plugin page: school-governor-b...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.6
  • WordPress version: 6.3.1
  • First release: Nov 26, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ScottItchy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.50MB] [CPU: ▲6.16ms] Passed 4 tests

A check of server-side resources used by School Governor Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3455.41 ▲8.51
Dashboard /wp-admin3.87 ▲0.5563.19 ▲8.74
Posts /wp-admin/edit.php3.92 ▲0.5555.60 ▲2.52
Add New Post /wp-admin/post-new.php6.44 ▲0.55109.12 ▲18.88
Media Library /wp-admin/upload.php3.79 ▲0.5543.44 ▲4.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 367 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for School Governor Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲2913.19 ▼1.412.64 ▲0.6846.39 ▼0.88
Dashboard /wp-admin2,219 ▲195.86 ▼0.20108.53 ▲3.2839.41 ▼4.30
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0642.74 ▲1.9535.85 ▼1.18
Add New Post /wp-admin/post-new.php6,430 ▲4,89720.49 ▼2.39816.23 ▲159.3268.62 ▲0.91
Media Library /wp-admin/upload.php1,395 ▲44.24 ▲0.0798.32 ▼0.3544.68 ▼0.51

Uninstaller [IO: ✅] [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
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Good news, no errors were detected

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 take a closer look at the following
  • 41× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/school-governor-block-by-itchyrobot/CMB2/includes/types/CMB2_Type_Picker_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: compliance, school, governors, education

school-governor-block-by-itchyrobot/governorblock.php 92% from 13 tests

"School Governor Block" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("school-governor-block-by-itchyrobot.php" instead of "governorblock.php")

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
Everything looks great! No dangerous files found in this plugin52,130 lines of code in 221 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP582,1656,4377,337
CSS132551,1864,571
JSON2004,264
JavaScript83655921,493
Sass17305291,407
Markdown32390735

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.59
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes70
▷ Abstract classes912.86%
▷ Concrete classes6187.14%
▷ Final classes00.00%
Methods550
▷ Static methods8916.18%
▷ Public methods45682.91%
▷ Protected methods9016.36%
▷ Private methods40.73%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
CMB2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
CMB2/images/ico-delete.png0.70KB0.72KB0.00%
CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%