89% inazo-flamingo-automatically-delete-old-messages

Code Review | Inazo's flamingo automatically delete old messages

WordPress plugin Inazo's flamingo automatically delete old messages scored89%from 54 tests.

About plugin

  • Plugin page: inazo-flamingo-au...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Dec 15, 2017
  • Number of updates: 6
  • Update frequency: every 15.5 days
  • Top authors: inazo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active /9,257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.45ms] Passed 4 tests

Analyzing server-side resources used by Inazo's flamingo automatically delete old messages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.14 ▼0.97
Dashboard /wp-admin3.34 ▲0.0445.95 ▼2.16
Posts /wp-admin/edit.php3.45 ▲0.1051.39 ▼7.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.73 ▼17.75
Media Library /wp-admin/upload.php3.26 ▲0.0436.38 ▼1.93
Flamingo auto trash /wp-admin/options-general.php?page=inazo.flamingo.auto.trash.config3.2333.32

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 10 new options
New WordPress options
inazo_flamingo_auto_trash_contact_days
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
inazo_flamingo_auto_trash_outbound_days
inazo_flamingo_auto_trash_inbound_days
theysaidso_admin_options
widget_recent-posts
inazo_flamingo_auto_trash_version

Browser metrics Passed 4 tests

A check of browser resources used by Inazo's flamingo automatically delete old messages
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.68 ▼0.621.71 ▼0.0243.91 ▼2.14
Dashboard /wp-admin2,219 ▲165.83 ▲0.8099.69 ▼6.9439.69 ▼1.25
Posts /wp-admin/edit.php2,104 ▲11.96 ▼0.0538.56 ▼1.9037.99 ▼0.62
Add New Post /wp-admin/post-new.php1,552 ▼223.47 ▲5.06662.89 ▲46.0953.77 ▲2.21
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.0295.74 ▼8.1846.26 ▼1.27
Flamingo auto trash /wp-admin/options-general.php?page=inazo.flamingo.auto.trash.config8202.0522.8326.54

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === inazo-flamingo-automatically-delete-old-messages === )
The official readme.txt is a good inspiration

inazo-flamingo-automatically-delete-old-messages/inazo-flamingo-automatically-delete-old-messages.php 92% from 13 tests

The principal PHP file in "Inazo's flamingo automatically delete old messages" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected159 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47743135
PO File161224

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There are no PNG files in this plugin