84% wpfomo

Code Review | WPFomo

WordPress plugin WPFomo scored 84% from 54 tests.

About plugin

  • Plugin page: wpfomo
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Aug 28, 2019
  • Number of updates: 13
  • Update frequency: every 51.5 days
  • Top authors: re_enter_rupok (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 17,352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.10MB] [CPU: ▼23.38ms] Passed 4 tests

A check of server-side resources used by WPFomo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0822.98 ▼20.24
Dashboard /wp-admin3.27 ▼0.0331.52 ▼30.60
Posts /wp-admin/edit.php3.35 ▼0.0140.10 ▼8.99
Add New Post /wp-admin/post-new.php5.53 ▼0.3569.72 ▼33.67
Media Library /wp-admin/upload.php3.24 ▲0.0129.35 ▼5.63

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPFomo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,104 ▲36915.57 ▲1.325.32 ▲3.6638.80 ▲0.32
Dashboard /wp-admin2,400 ▲2186.58 ▲0.70134.03 ▲29.6743.84 ▲8.34
Posts /wp-admin/edit.php2,306 ▲2173.45 ▲1.4457.07 ▲19.4537.00 ▲5.18
Add New Post /wp-admin/post-new.php1,631 ▲11722.54 ▲4.97658.74 ▲35.4138.41 ▼11.55
Media Library /wp-admin/upload.php1,439 ▲484.28 ▲0.0782.83 ▼15.2145.80 ▼0.01

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

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

Smoke tests 75% 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 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfomo/public/partials/wpfomo-public-display.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please a description for screenshot #3 in wpfomo/assets to your readme.txt
You can take inspiration from this readme.txt

wpfomo/wpfomo.php Passed 13 tests

The main PHP script in "WPFomo" version 1.1.0 is automatically included on every request by WordPress
41 characters long description:
Show fomo notification on WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected790 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12164524442
CSS23414205
JavaScript31818143

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/wpfomo-logo.png23.66KB10.50KB▼ 55.65%
admin/images/wpfomo-logo.png23.66KB10.50KB▼ 55.65%