79% flamingo

Code Review | Flamingo

WordPress plugin Flamingo scored79%from 54 tests.

About plugin

  • Plugin page: flamingo
  • Plugin version: 2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: May 5, 2012
  • Latest release: May 19, 2023
  • Number of updates: 220
  • Update frequency: every 18.5 days
  • Top authors: takayukister (100%)

Code review

54 tests

User reviews

115 reviews

Install metrics

700,000+ active /6,053,021 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼5.51ms] Passed 4 tests

Analyzing server-side resources used by Flamingo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1943.55 ▲5.82
Dashboard /wp-admin3.61 ▲0.2450.77 ▼9.16
Posts /wp-admin/edit.php3.73 ▲0.3454.35 ▲1.50
Add New Post /wp-admin/post-new.php6.19 ▲0.2885.60 ▼19.42
Media Library /wp-admin/upload.php3.54 ▲0.2738.19 ▲5.06
Inbound Messages /wp-admin/admin.php?page=flamingo_inbound3.5939.55
Address Book /wp-admin/admin.php?page=flamingo3.5847.94

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Flamingo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.59 ▼0.791.69 ▼0.2643.15 ▼0.02
Dashboard /wp-admin2,229 ▲444.87 ▼0.97105.24 ▲3.6836.82 ▼6.48
Posts /wp-admin/edit.php2,112 ▲232.02 ▼0.0340.21 ▲0.4636.10 ▲1.97
Add New Post /wp-admin/post-new.php1,552 ▲2223.24 ▲5.09653.16 ▼20.4053.74 ▲2.64
Media Library /wp-admin/upload.php1,411 ▲234.22 ▲0.0494.95 ▼2.5841.45 ▲0.14
Inbound Messages /wp-admin/admin.php?page=flamingo_inbound1,1061.9731.5030.82
Address Book /wp-admin/admin.php?page=flamingo1,2051.9731.1630.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/flamingo/admin/edit-inbound-form.php
    • > /wp-content/plugins/flamingo/admin/edit-contact-form.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flamingo/admin/includes/class-contacts-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flamingo/includes/comment.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flamingo/includes/user.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flamingo/admin/includes/privacy.php:9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/flamingo/admin/includes/class-contacts-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flamingo/includes/csv.php:194
    • > PHP Warning
      Use of undefined constant FLAMINGO_PLUGIN_DIR - assumed 'FLAMINGO_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/flamingo/admin/admin.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/flamingo/admin/includes/class-inbound-messages-list-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flamingo/admin/includes/class-inbound-messages-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flamingo/includes/cron.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: mail, bird, crm, contact

flamingo/flamingo.php Passed 13 tests

This is the main PHP file of "Flamingo" version 2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
56 characters long description:
A trustworthy message storage plugin for Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,765 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP197261272,690
CSS216066
JavaScript1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity25.29
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods64
▷ Static methods1117.19%
▷ Public methods4164.06%
▷ Protected methods2234.38%
▷ Private methods11.56%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin