84% sogo-accessibility

Code Review | SOGO Accessibility

WordPress plugin SOGO Accessibility scored84%from 54 tests.

About plugin

  • Plugin page: sogo-accessibility
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Dec 15, 2019
  • Number of updates: 54
  • Update frequency: every 26.3 days
  • Top authors: orenhav (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

6,000+ active /33,752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼1.15ms] Passed 4 tests

An overview of server-side resources used by SOGO Accessibility
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3643.33 ▼6.68
Dashboard /wp-admin3.64 ▲0.3450.33 ▼0.59
Posts /wp-admin/edit.php3.70 ▲0.3452.90 ▲0.33
Add New Post /wp-admin/post-new.php6.18 ▲0.29104.48 ▲6.02
Media Library /wp-admin/upload.php3.50 ▲0.2842.52 ▲2.34
Premium /wp-admin/admin.php?page=sogo_accessibility&tab=premium3.4833.20
CSS /wp-admin/admin.php?page=sogo_accessibility&tab=css3.4844.78
Settings /wp-admin/admin.php?page=sogo_accessibility&tab=settings3.5443.29

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SOGO Accessibility
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,035 ▲28913.70 ▼0.8811.28 ▲8.6643.78 ▼0.41
Dashboard /wp-admin2,236 ▲484.96 ▼0.12136.23 ▲33.2253.23 ▲12.29
Posts /wp-admin/edit.php2,125 ▲332.02 ▼0.0142.63 ▲3.4438.46 ▲2.54
Add New Post /wp-admin/post-new.php1,547 ▲3317.38 ▼0.36683.30 ▲9.2350.91 ▼3.43
Media Library /wp-admin/upload.php1,421 ▲334.32 ▲0.09103.23 ▼8.0248.06 ▼2.97
Premium /wp-admin/admin.php?page=sogo_accessibility&tab=premium9392.2333.0530.41
CSS /wp-admin/admin.php?page=sogo_accessibility&tab=css9322.1429.1127.31
Settings /wp-admin/admin.php?page=sogo_accessibility&tab=settings1,8276.72144.4258.57

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • sogo_accessibility_settings
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • _sogo_acc_lk_status
    • 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
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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'sogo_accessibility_Option' not found in wp-content/plugins/sogo-accessibility/public/public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sogo-accessibility/admin/partials/meta-box-display.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sogo-accessibility/admin/partials/admin-display.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: accessibility

sogo-accessibility/sogo_accessibility.php 85% from 13 tests

"SOGO Accessibility" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sogo-accessibility.php" instead of "sogo_accessibility.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected4,129 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS4128401,455
PHP194481,0651,084
LESS29145658
JavaScript77056495
PO File3197242421
SVG10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.23
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods76
▷ Static methods911.84%
▷ Public methods5977.63%
▷ Protected methods00.00%
▷ Private methods1722.37%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/spritesheet.png9.70KB3.94KB▼ 59.39%
public/css/sogo-logo.png2.62KB1.51KB▼ 42.51%