10% get-snarky

Code Review | Get Snarky

WordPress plugin Get Snarky scored 10% from 54 tests.

About plugin

  • Plugin page: get-snarky
  • Plugin version: 1.46
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Apr 13, 2010
  • Latest release: Dec 24, 2012
  • Number of updates: 48
  • Update frequency: every 20.6 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,194 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/get-snarky/get-snarky.php+531
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.68ms] Passed 4 tests

A check of server-side resources used by Get Snarky
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.90 ▼36.77
Dashboard /wp-admin2.05 ▼1.265.24 ▼45.27
Posts /wp-admin/edit.php2.05 ▼1.317.04 ▼38.49
Add New Post /wp-admin/post-new.php2.05 ▼3.846.22 ▼98.18
Media Library /wp-admin/upload.php2.05 ▼1.186.66 ▼25.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_snarky-widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Get Snarky
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.20 ▼1.171.52 ▼0.3431.34 ▼13.05
Dashboard /wp-admin2,209 ▲244.85 ▼0.03104.45 ▼2.3038.17 ▲0.41
Posts /wp-admin/edit.php2,097 ▲82.03 ▼0.0234.78 ▼7.9932.40 ▼4.81
Add New Post /wp-admin/post-new.php1,590 ▲7022.82 ▼0.40669.11 ▲55.2553.19 ▲8.76
Media Library /wp-admin/upload.php1,397 ▲124.18 ▼0.0497.72 ▼3.4844.75 ▼2.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/get-snarky/get-snarky.php+531
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_snarky-widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/get-snarky/get-snarky.php:29

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (An example of how a quote will appear. This isn't rocket science, people.) image not found
You can take inspiration from this readme.txt

get-snarky/get-snarky.php 92% from 13 tests

Analyzing the main PHP file in "Get Snarky" version 1.46
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("2.8" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin436 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13857436

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.56KB18.86KB▼ 3.57%