10% optimizer-for-faster-websites

Code Review | Optimizer For Faster Websites

WordPress plugin Optimizer For Faster Websites scored10%from 54 tests.

About plugin

  • Plugin page: optimizer-for-fas...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Oct 10, 2015
  • Latest release: Nov 19, 2015
  • Number of updates: 3
  • Update frequency: every 13.4 days
  • Top authors: tobias_.MerZ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,669 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_admin.php+296
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼49.54ms] Passed 4 tests

A check of server-side resources used by Optimizer For Faster Websites
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.12 ▼32.32
Dashboard /wp-admin2.10 ▼1.206.01 ▼43.63
Posts /wp-admin/edit.php2.10 ▼1.256.50 ▼38.86
Add New Post /wp-admin/post-new.php2.10 ▼3.786.33 ▼83.34
Media Library /wp-admin/upload.php2.10 ▼1.125.26 ▼28.79
PageSpeed Optimize /wp-admin/tools.php?page=pagespeed_options2.105.82

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Optimizer For Faster Websites
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.64 ▼1.115.18 ▲3.3337.31 ▼6.82
Dashboard /wp-admin2,211 ▲405.81 ▲0.96105.93 ▼11.5337.78 ▼4.54
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0441.80 ▲5.7836.83 ▲1.97
Add New Post /wp-admin/post-new.php1,521 ▲217.62 ▼5.50631.36 ▼35.5358.09 ▼0.80
Media Library /wp-admin/upload.php1,396 ▲84.27 ▲0.04110.48 ▲7.5640.94 ▼7.09
PageSpeed Optimize /wp-admin/tools.php?page=pagespeed_options8312.0725.8724.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_admin.php+296
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=pagespeed_options
    • > Deprecated in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_admin.php+296
    Function create_function() is deprecated
    • > GET request to /wp-admin/tools.php?page=pagespeed_options
    • > Notice in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_gen_fct.php+22
    Undefined index: general_hidden_pso
    • > GET request to /wp-admin/tools.php?page=pagespeed_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=pagespeed_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
The following issues need your attention
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/optimizer-for-faster-websites/pso_pagespeed.php
    • > /wp-content/plugins/optimizer-for-faster-websites/pso_caching.php
    • > /wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_general.php
    • > /wp-content/plugins/optimizer-for-faster-websites/pso_caching_modified.php
    • > /wp-content/plugins/optimizer-for-faster-websites/pso_open_htaccess.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_admin.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/optimizer-for-faster-websites/adminpages/pso_gen_fct.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: These screenshots have no corresponding images in /assets: #1 ('General Tab' where you can activate Browser Caching and GZIP Compression with default settings.), #2 ('Browser Caching Tab' where you can modify the expiration time and check the impact of your .htaccess file.), #3 (Modification Form of Browser Caching.), #4 (The impact of the .htaccess file after you activated Browser Caching and GZIP Compression.), #5 (Error message if you are already using Browser Caching and try to activate it again.)
You can take inspiration from this readme.txt

optimizer-for-faster-websites/pso_pagespeed.php 92% from 13 tests

"Optimizer For Faster Websites" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("optimizer-for-faster-websites.php" instead of "pso_pagespeed.php")

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
There were no executable files found in this plugin615 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8131271590
CSS141520
JavaScript1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png17.68KB8.75KB▼ 50.52%
screenshot-5.png27.47KB13.22KB▼ 51.86%
screenshot-4.png48.63KB19.91KB▼ 59.06%
screenshot-3.png33.33KB16.03KB▼ 51.90%
screenshot-1.png20.00KB9.38KB▼ 53.12%