78% fasty

Code Review | Fasty

WordPress plugin Fasty scored78%from 54 tests.

About plugin

  • Plugin page: fasty
  • Plugin version: 1.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5
  • WordPress version: 6.3.1
  • First release: Jan 16, 2021
  • Latest release: Apr 30, 2021
  • Number of updates: 8
  • Update frequency: every 13.5 days
  • Top authors: melissa2011 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /781 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼13.12ms] Passed 4 tests

Analyzing server-side resources used by Fasty
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.06 ▼1.03
Dashboard /wp-admin3.32 ▼0.0248.31 ▼18.96
Posts /wp-admin/edit.php3.44 ▲0.0849.20 ▼6.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.21 ▼26.10
Media Library /wp-admin/upload.php3.25 ▲0.0239.67 ▲5.80

Server storage [IO: ▲0.03MB] [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: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fasty
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6514.28 ▼0.311.63 ▼0.0342.37 ▲0.28
Dashboard /wp-admin2,216 ▲395.51 ▼0.1394.24 ▲5.2541.74 ▲1.22
Posts /wp-admin/edit.php2,124 ▲241.98 ▼0.0334.16 ▼5.8635.16 ▼1.07
Add New Post /wp-admin/post-new.php1,544 ▲1823.07 ▼0.64669.99 ▼21.0266.14 ▲7.45
Media Library /wp-admin/upload.php1,415 ▲154.19 ▲0.03101.36 ▼3.7343.33 ▼1.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fasty/fasty.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fasty/inc/FastyMain.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_meta() in wp-content/plugins/fasty/inc/FastyAdmin.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fasty/templates/admin/template-setting.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #1 in fasty/assets to your readme.txt
You can look at the official readme.txt

fasty/fasty.php 85% from 13 tests

The principal PHP file in "Fasty" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected544 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Markdown2890351
PHP526110192
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods15
▷ Static methods533.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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
No PNG images were found in this plugin