78% pretty-gists

Code Review | Pretty Gists

WordPress plugin Pretty Gists scored78%from 54 tests.

About plugin

  • Plugin page: pretty-gists
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Sep 25, 2012
  • Number of updates: 20
  • Update frequency: every 0.2 days
  • Top authors: robsaurini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.32ms] Passed 4 tests

Server-side resources used by Pretty Gists
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.95 ▼5.40
Dashboard /wp-admin3.34 ▲0.0448.78 ▼1.90
Posts /wp-admin/edit.php3.39 ▲0.0449.47 ▼2.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.72 ▲0.87
Media Library /wp-admin/upload.php3.26 ▲0.0336.45 ▲4.94
Pretty Gists /wp-admin/options-general.php?page=rs-pretty-gists3.2140.88

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pretty Gists
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.37 ▼0.001.70 ▼0.2044.23 ▼0.69
Dashboard /wp-admin2,198 ▲185.55 ▼0.0582.67 ▼8.5539.71 ▼4.53
Posts /wp-admin/edit.php2,106 ▲32.03 ▲0.0139.73 ▼5.2438.25 ▲1.60
Add New Post /wp-admin/post-new.php1,530 ▲423.57 ▲0.75610.25 ▼13.2459.29 ▲13.54
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.00104.00 ▲0.2245.61 ▼2.82
Pretty Gists /wp-admin/options-general.php?page=rs-pretty-gists8641.9923.8528.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rs-pretty-gists
    • > Notice in wp-content/plugins/pretty-gists/rs-pretty-gists.php+120
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pretty-gists/rs-pretty-gists.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

pretty-gists/rs-pretty-gists.php 92% from 13 tests

"Pretty Gists" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("pretty-gists.php" instead of "rs-pretty-gists.php")

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
No dangerous file extensions were detected153 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17123148
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin