83% star-snippets-rich-snippet-vote

Code Review | Star Snippets - Rich Snippet Vote

WordPress plugin Star Snippets - Rich Snippet Vote scored83%from 54 tests.

About plugin

  • Plugin page: star-snippets-ric...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2013
  • Latest release: Apr 29, 2013
  • Number of updates: 7
  • Update frequency: every 12.4 days
  • Top authors: 1sr (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.28MB] [CPU: ▼21.67ms] Passed 4 tests

A check of server-side resources used by Star Snippets - Rich Snippet Vote
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.24 ▼6.08
Dashboard /wp-admin3.37 ▲0.0247.69 ▼15.30
Posts /wp-admin/edit.php3.42 ▲0.0648.82 ▲1.51
Add New Post /wp-admin/post-new.php4.66 ▼1.2342.85 ▼66.79
Media Library /wp-admin/upload.php3.29 ▲0.0637.62 ▲4.98
Star Snippets /wp-admin/options-general.php?page=star-snippets-plugin-options3.2633.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Star Snippets - Rich Snippet Vote
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.48 ▼0.172.07 ▲0.3042.39 ▲0.66
Dashboard /wp-admin2,213 ▲255.86 ▼0.0498.08 ▼0.2438.84 ▼4.21
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0133.35 ▼8.0935.39 ▼2.21
Add New Post /wp-admin/post-new.php1,517 ▼217.52 ▼5.75690.41 ▲87.8053.20 ▼1.95
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0598.02 ▼1.3945.79 ▲4.52
Star Snippets /wp-admin/options-general.php?page=star-snippets-plugin-options1,0522.0221.9227.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/star-snippets-rich-snippet-vote/star_snippets.php:32

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 90% 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === star-snippets-rich-snippet-vote === )
The official readme.txt is a good inspiration

star-snippets-rich-snippet-vote/star_snippets.php 85% from 13 tests

"Star Snippets - Rich Snippet Vote" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("star-snippets-rich-snippet-vote.php" instead of "star_snippets.php")
  • 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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected303 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18935303

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity9.33
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.46KB25.83KB▼ 50.75%
screenshot-2.png37.85KB16.18KB▼ 57.24%