83% pressfore-preloaders

Code Review | Pressfore Preloaders

WordPress plugin Pressfore Preloaders scored83%from 54 tests.

About plugin

  • Plugin page: pressfore-preloaders
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Jan 2, 2018
  • Number of updates: 4
  • Update frequency: every 41.5 days
  • Top authors: pressfore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.59ms] Passed 4 tests

This is a short check of server-side resources used by Pressfore Preloaders
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.35 ▲1.87
Dashboard /wp-admin3.34 ▲0.0443.93 ▼6.11
Posts /wp-admin/edit.php3.46 ▲0.1049.54 ▲2.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0478.73 ▼14.50
Media Library /wp-admin/upload.php3.27 ▲0.0434.76 ▲0.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Pressfore Preloaders
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲25713.63 ▼0.8612.43 ▲10.4641.40 ▼2.97
Dashboard /wp-admin2,206 ▲184.87 ▼0.07108.03 ▼8.3041.11 ▼5.47
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0138.75 ▲0.6035.75 ▲0.36
Add New Post /wp-admin/post-new.php1,537 ▼523.18 ▼0.09625.67 ▼55.0358.78 ▲0.70
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0096.53 ▼14.3342.54 ▼6.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/pressfore-preloaders/inc/control-radio-image.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/pressfore-preloaders/inc/control-button-preview.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pressfore-preloaders/inc/options.php:144
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pressfore-preloaders/inc/render.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

pressfore-preloaders/pressfore-preloaders.php 85% from 13 tests

"Pressfore Preloaders" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,343 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS3240252,592
PHP8124160479
JavaScript43815272

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin