84% sezame

Code Review | Sezame

WordPress plugin Sezame scored 84% from 54 tests.

About plugin

  • Plugin page: sezame
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.0
  • WordPress version: 6.3.1
  • First release: May 19, 2016
  • Latest release: Apr 2, 2019
  • Number of updates: 14
  • Update frequency: every 75.2 days
  • Top authors: finpin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 653 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 gracefully, with no errors

Server metrics [RAM: ▼0.21MB] [CPU: ▼14.03ms] Passed 4 tests

Analyzing server-side resources used by Sezame
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6715.48 ▼26.45
Dashboard /wp-admin3.35 ▲0.0544.00 ▼8.21
Posts /wp-admin/edit.php3.11 ▼0.2428.96 ▼19.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.48 ▼1.66
Media Library /wp-admin/upload.php3.27 ▲0.0434.98 ▲2.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 364 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Sezame
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17814.06 ▼0.325.85 ▲4.0845.80 ▲0.91
Dashboard /wp-admin2,225 ▲375.87 ▲1.0097.79 ▼12.5074.08 ▲27.36
Posts /wp-admin/edit.php2,111 ▲222.00 ▲0.0038.79 ▲1.4233.20 ▼0.11
Add New Post /wp-admin/post-new.php1,551 ▲3723.29 ▲5.72642.33 ▲35.5373.35 ▲3.33
Media Library /wp-admin/upload.php1,401 ▲134.27 ▲0.0296.82 ▲3.1266.30 ▲25.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sezame/sezame.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Buzz\\Message\\AbstractMessage' not found in wp-content/plugins/sezame/includes/Buzz/Message/Request.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Buzz\\Client\\AbstractClient' not found in wp-content/plugins/sezame/includes/Buzz/Client/AbstractStream.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SezameLib\\Request\\Generic' not found in wp-content/plugins/sezame/includes/SezameLib/Request/Auth.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Buzz\\Message\\MessageInterface' not found in wp-content/plugins/sezame/includes/Buzz/Message/Form/FormUploadInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SezameLib\\Response\\Generic' not found in wp-content/plugins/sezame/includes/SezameLib/Response/Cancel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SezameLib\\Response\\Response' not found in wp-content/plugins/sezame/includes/SezameLib/Response/Generic.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SezameLib\\Response\\Generic' not found in wp-content/plugins/sezame/includes/SezameLib/Response/LinkStatus.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SezameLib\\Request\\Generic' not found in wp-content/plugins/sezame/includes/SezameLib/Request/Status.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Buzz\\Client\\ClientInterface' not found in wp-content/plugins/sezame/includes/Buzz/Client/AbstractClient.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #1 is missing in sezame/assets to your readme.txt
You can look at the official readme.txt

sezame/sezame.php 92% from 13 tests

The main file in "Sezame" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,208 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PHP751,2431,3154,898
PO File16265169
JavaScript1320141

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.07
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces18
Interfaces9
Traits0
Classes64
▷ Abstract classes69.38%
▷ Concrete classes5890.62%
▷ Final classes00.00%
Methods483
▷ Static methods71.45%
▷ Public methods42988.82%
▷ Protected methods71.45%
▷ Private methods479.73%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants26
▷ Global constants27.69%
▷ Class constants2492.31%
▷ Public constants24100.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
50 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/google-play-badge.png48.58KB3.49KB▼ 92.81%
assets/image/qrv3.png0.15KB0.14KB▼ 5.19%
assets/image/qrv35.png0.25KB0.23KB▼ 9.20%
assets/image/qrv24.png0.26KB0.24KB▼ 6.84%
assets/apple-itunes-badge.png39.91KB2.69KB▼ 93.25%