74% share-to-google-classroom

Code Review | Share to Google Classroom

WordPress plugin Share to Google Classroom scored74%from 54 tests.

About plugin

  • Plugin page: share-to-google-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 23, 2020
  • Latest release: Mar 24, 2020
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: pritenhshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /14,334 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.67ms] Passed 4 tests

Analyzing server-side resources used by Share to Google Classroom
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.04 ▼41.09
Dashboard /wp-admin2.05 ▼1.265.37 ▼49.93
Posts /wp-admin/edit.php2.05 ▼1.315.45 ▼42.66
Add New Post /wp-admin/post-new.php2.05 ▼3.845.28 ▼101.01
Media Library /wp-admin/upload.php2.05 ▼1.186.08 ▼33.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Share to Google Classroom
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.151.87 ▼0.1240.24 ▼3.09
Dashboard /wp-admin2,195 ▲155.67 ▲0.0783.19 ▼20.9743.66 ▼3.74
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.89 ▼1.0836.21 ▲0.26
Add New Post /wp-admin/post-new.php1,545 ▲1223.03 ▼0.27588.65 ▼74.0166.40 ▲11.72
Media Library /wp-admin/upload.php1,394 ▼04.24 ▲0.0198.35 ▼9.5240.76 ▼8.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the google_api handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_script() in wp-content/plugins/share-to-google-classroom/share_to_google_classroom.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
3 plugin tags: education, google classroom, social share

share-to-google-classroom/share_to_google_classroom.php 92% from 13 tests

The main PHP script in "Share to Google Classroom" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("share-to-google-classroom.php" instead of "share_to_google_classroom.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152427

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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 files were detected