84% notiflyer

Code Review | Notiflyer

WordPress plugin Notiflyer scored84%from 54 tests.

About plugin

  • Plugin page: notiflyer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2013
  • Latest release: Jan 11, 2023
  • Number of updates: 10
  • Update frequency: every 358.2 days
  • Top authors: StuckOn_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Notiflyer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.94 ▲1.91
Dashboard /wp-admin3.31 ▼0.0349.47 ▼9.87
Posts /wp-admin/edit.php3.36 ▲0.0145.81 ▼2.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.43 ▼2.00
Media Library /wp-admin/upload.php3.23 ▲0.0033.18 ▼2.12
Notiflyer /wp-admin/options-general.php?page=Notiflyer3.2031.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Notiflyer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.021.67 ▲0.1242.85 ▲4.09
Dashboard /wp-admin2,202 ▲345.57 ▲0.0383.80 ▼8.3739.30 ▼0.80
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0539.54 ▲4.5735.62 ▼4.72
Add New Post /wp-admin/post-new.php1,539 ▲1318.31 ▼5.24597.84 ▼59.2668.96 ▲5.25
Media Library /wp-admin/upload.php1,398 ▼24.28 ▲0.0997.80 ▲0.1541.85 ▼3.85
Notiflyer /wp-admin/options-general.php?page=Notiflyer8091.9926.1828.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/notiflyer/notiflyer.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === notiflyer === )
  • Screenshots: Add an image for screenshot #1 (The Notiflyer Options screen where a message is set.)
The official readme.txt might help

notiflyer/notiflyer.php Passed 13 tests

The primary PHP file in "Notiflyer" version 1.0 is used by WordPress to initiate all plugin functionality
51 characters long description:
Add custom messages to comment notification emails.

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
Everything looks great! No dangerous files found in this plugin90 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1281090

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.09KB6.74KB▼ 55.37%