84% snippets-se

Code Review | Snippets SE

WordPress plugin Snippets SE scored84%from 54 tests.

About plugin

  • Plugin page: snippets-se
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 15, 2016
  • Latest release: Aug 31, 2016
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: filmmaker3000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /506 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.04MB] [CPU: ▼4.46ms] Passed 4 tests

A check of server-side resources used by Snippets SE
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.44 ▼1.20
Dashboard /wp-admin3.36 ▲0.0147.08 ▼6.40
Posts /wp-admin/edit.php3.41 ▲0.0548.84 ▲1.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.66 ▼11.40
Media Library /wp-admin/upload.php3.28 ▲0.0536.59 ▲3.16
All Snippets /wp-admin/edit.php?post_type=snippet3.3234.15
Collections /wp-admin/edit-tags.php?taxonomy=sse-collection&post_type=snippet3.2733.40
Add New /wp-admin/post-new.php?post_type=snippet3.3948.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Snippets SE
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.31 ▼1.061.58 ▼0.1540.50 ▼0.45
Dashboard /wp-admin2,234 ▲435.83 ▲0.87112.04 ▲4.8841.00 ▲0.22
Posts /wp-admin/edit.php2,120 ▲282.02 ▲0.0241.01 ▲2.6234.05 ▼3.75
Add New Post /wp-admin/post-new.php1,540 ▲1717.49 ▼5.77680.73 ▼10.7556.88 ▼2.19
Media Library /wp-admin/upload.php1,422 ▲404.12 ▼0.06110.91 ▲10.4146.53 ▲0.06
All Snippets /wp-admin/edit.php?post_type=snippet1,1081.9331.2730.78
Collections /wp-admin/edit-tags.php?taxonomy=sse-collection&post_type=snippet1,2902.1326.2327.28
Add New /wp-admin/post-new.php?post_type=snippet2,2557.64169.8560.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however 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
Please take a closer look at the following
  • 2× 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/snippets-se/lib/snippets_cpt.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/snippets-se/lib/snippets_cpt.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

snippets-se/snippets-se.php 92% from 13 tests

The main PHP file in "Snippets SE" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21521119
Markdown15011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin