83% subject-registration-addon

Code Review | Subject Registration Addon

WordPress plugin Subject Registration Addon scored83%from 54 tests.

About plugin

  • Plugin page: subject-registrat...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Jan 16, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ryner1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /504 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.09MB] [CPU: ▼3.41ms] Passed 4 tests

This is a short check of server-side resources used by Subject Registration Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.58 ▼2.35
Dashboard /wp-admin3.41 ▲0.1147.92 ▲0.83
Posts /wp-admin/edit.php3.46 ▲0.1151.29 ▲5.18
Add New Post /wp-admin/post-new.php6.01 ▲0.1388.93 ▲3.10
Media Library /wp-admin/upload.php3.34 ▲0.1137.01 ▼15.21
Subjects /wp-admin/edit.php?post_type=rsgsrf3.3834.97
Tables /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_tables3.3131.20
School Levels /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_school_level3.3131.22
Tutoring Types /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_tutoring_type3.3129.55
Add New /wp-admin/post-new.php?post_type=rsgsrf3.4545.88
Help /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_help_page3.3036.81

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Subject Registration Addon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲23013.94 ▼0.728.73 ▲6.9842.51 ▲2.82
Dashboard /wp-admin2,264 ▲795.77 ▼0.1199.07 ▼0.7838.70 ▼0.12
Posts /wp-admin/edit.php2,150 ▲612.06 ▲0.0639.73 ▲3.5537.14 ▲2.22
Add New Post /wp-admin/post-new.php1,572 ▲3923.26 ▼0.01647.54 ▲6.9068.07 ▲14.03
Media Library /wp-admin/upload.php1,446 ▲554.24 ▲0.0796.54 ▼14.7742.85 ▼4.57
Subjects /wp-admin/edit.php?post_type=rsgsrf1,1211.9931.8327.85
Tables /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_tables8992.2223.5841.77
School Levels /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_school_level8992.2223.8127.35
Tutoring Types /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_tutoring_type8992.2225.3228.69
Add New /wp-admin/post-new.php?post_type=rsgsrf2,1667.53165.0833.28
Help /wp-admin/edit.php?post_type=rsgsrf&page=rsgsrf_help_page9432.0527.9631.78

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
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subject-registration-addon/rsgsrf-client/functions/rsgsrf-subjects_table.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subject-registration-addon/rsgsrf-admin/functions/rsgsrf-single_post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subject-registration-addon/rsgsrf-admin/functions/rsgsrf-tables_page.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subject-registration-addon/rsgsrf-admin/functions/rsgsrf-school_level.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subject-registration-addon/rsgsrf-admin/functions/rsgsrf-tutoring_type.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: subject registration, online tutor, registration, gravity form addon, online registration...

subject-registration-addon/rsgsrf.php 77% from 13 tests

"Subject Registration Addon" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/lang")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("subject-registration-addon.php" instead of "rsgsrf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin12,517 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92,2862,05310,006
CSS67129847
PHP912989688
HTML4740438
Markdown31050253
LESS1283176
JSON20091
SVG10018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.62MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
rsgsrf-admin/images/img3.png17.97KB17.89KB0.45%
lib/lity/test/functional/img/sample.png538.58KB170.82KB▼ 68.28%
rsgsrf-admin/images/img1.png18.36KB17.91KB▼ 2.44%
rsgsrf-admin/images/img4.png36.14KB35.89KB▼ 0.69%
rsgsrf-admin/images/img2.png21.01KB21.37KB0.00%