68% fcc-slow-lane

Code Review | FCC Slow Lane

WordPress plugin FCC Slow Lane scored68%from 54 tests.

About plugin

  • Plugin page: fcc-slow-lane
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: May 23, 2014
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: evoknow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /843 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.22MB] [CPU: ▼44.61ms] Passed 4 tests

A check of server-side resources used by FCC Slow Lane
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7112.42 ▼30.75
Dashboard /wp-admin2.79 ▼0.5115.44 ▼32.58
Posts /wp-admin/edit.php2.79 ▼0.5616.16 ▼29.03
Add New Post /wp-admin/post-new.php2.79 ▼3.0918.43 ▼86.09
Media Library /wp-admin/upload.php2.79 ▼0.4414.21 ▼23.13

Server storage [IO: ▲0.30MB] [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
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for FCC Slow Lane
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.121.67 ▼0.0240.83 ▼4.29
Dashboard /wp-admin2,203 ▲185.80 ▼0.0797.51 ▼5.1439.01 ▼6.62
Posts /wp-admin/edit.php2,099 ▲102.04 ▲0.0551.12 ▲14.1144.13 ▲10.10
Add New Post /wp-admin/post-new.php1,532 ▼122.90 ▼0.34633.75 ▼22.6947.02 ▼14.06
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.00103.38 ▲7.8241.46 ▼2.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/fcc-slow-lane/SlowLanePlugin.php+38
    Undefined index: fcc
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/fcc-slow-lane/views/fcc.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/fcc-slow-lane/views/fcc.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fcc-slow-lane/fcc_slowlane.php:12
    • > PHP Notice
      Undefined index: fcc in wp-content/plugins/fcc-slow-lane/views/fcc.php on line 47
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fcc-slow-lane/views/fcc.php on line 50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Shows the header the FCC users see.)
You can look at the official readme.txt

fcc-slow-lane/fcc_slowlane.php 92% from 13 tests

The main PHP script in "FCC Slow Lane" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fcc-slow-lane.php" instead of "fcc_slowlane.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35920219

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.29MB with 0.16MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png294.63KB127.65KB▼ 56.67%