78% prettypre

Code Review | Prettypre

WordPress plugin Prettypre scored78%from 54 tests.

About plugin

  • Plugin page: prettypre
  • Plugin version: 1.30
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1+
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Sep 28, 2014
  • Number of updates: 20
  • Update frequency: every 3.7 days
  • Top authors: ifyouwillit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /776 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.27ms] Passed 4 tests

Server-side resources used by Prettypre
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.55 ▼1.79
Dashboard /wp-admin3.32 ▲0.0247.74 ▼0.99
Posts /wp-admin/edit.php3.38 ▲0.0248.76 ▲0.63
Add New Post /wp-admin/post-new.php5.90 ▲0.02100.64 ▼6.94
Media Library /wp-admin/upload.php3.25 ▲0.0237.25 ▲1.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Prettypre
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.18 ▼1.221.58 ▼0.1042.72 ▼2.34
Dashboard /wp-admin2,222 ▲344.87 ▼0.98112.38 ▲11.4743.09 ▲2.45
Posts /wp-admin/edit.php2,108 ▲221.96 ▼0.0936.35 ▼1.1830.20 ▼5.61
Add New Post /wp-admin/post-new.php1,555 ▲2118.48 ▼4.68606.26 ▲16.3146.04 ▼6.73
Media Library /wp-admin/upload.php1,404 ▲224.21 ▼0.0193.25 ▼3.7343.70 ▲1.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/prettypre/loadjs.php
    • > /wp-content/plugins/prettypre/prettyprecss.php
  • 10× 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/prettypre/options.php:3
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 104
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 36
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 74
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 56
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 121
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 89
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/prettypre/prettypre.php:27
    • > PHP Notice
      Undefined index: ts in wp-content/plugins/prettypre/prettyprecss.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === prettypre === )
  • Tested up to: Version format is invalid
You can take inspiration from this readme.txt

prettypre/prettypre.php 92% from 13 tests

The principal PHP file in "Prettypre" v. 1.30 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 189 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 plugin185 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46526185

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.00
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
No PNG files were detected