83% schgr-commons

Code Review | Sch.gr Commons

WordPress plugin Sch.gr Commons scored83%from 54 tests.

About plugin

  • Plugin page: schgr-commons
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2015
  • Latest release: Oct 24, 2022
  • Number of updates: 37
  • Update frequency: every 71.6 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /1,536 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.01ms] Passed 4 tests

An overview of server-side resources used by Sch.gr Commons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.56 ▼3.20
Dashboard /wp-admin3.32 ▲0.0251.04 ▼6.95
Posts /wp-admin/edit.php3.37 ▲0.0256.55 ▲6.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.41 ▼13.95
Media Library /wp-admin/upload.php3.24 ▲0.0238.49 ▲0.07

Server storage [IO: ▲0.83MB] [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
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sch.gr Commons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.161.84 ▼0.1244.41 ▲3.83
Dashboard /wp-admin2,206 ▲154.81 ▼0.31105.62 ▼3.8938.61 ▼5.50
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0533.91 ▼4.8433.38 ▲0.34
Add New Post /wp-admin/post-new.php1,533 ▼1423.13 ▲4.96652.26 ▲42.7951.28 ▼7.78
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.0199.98 ▼10.0641.05 ▼2.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schgr-commons/sch_gr_commons.php:18

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Please add images for these screenshots: #1 (Copy the url from a video.sch.gr video), #2 (Paste a simple url in post), #3 (The resulted embed video from https://video.sch.gr into the post.), #4 (Copy school's location link from https://maps.sch.gr)
You can look at the official readme.txt

schgr-commons/sch_gr_commons.php 77% from 13 tests

"Sch.gr Commons" version 4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WordPress 4.6")
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("schgr-commons.php" instead of "sch_gr_commons.php")

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
No dangerous file extensions were detected102 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1183754
PO File2244248

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.82MB with 0.55MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png206.07KB64.42KB▼ 68.74%
screenshot-2.png42.62KB15.97KB▼ 62.54%
screenshot-4.png185.25KB59.97KB▼ 67.63%
screenshot-3.png406.50KB127.27KB▼ 68.69%