79% flag-me

Code Review | Flag Me

WordPress plugin Flag Me scored 79% from 54 tests.

About plugin

  • Plugin page: flag-me
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Nov 19, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: Fahien (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,475 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.51ms] Passed 4 tests

Analyzing server-side resources used by Flag Me
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.98 ▲0.71
Dashboard /wp-admin3.33 ▲0.0355.98 ▲4.71
Posts /wp-admin/edit.php3.38 ▲0.0245.52 ▼9.38
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.79 ▼15.70
Media Library /wp-admin/upload.php3.26 ▲0.0237.26 ▼5.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Flag Me
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.30 ▼1.281.72 ▼0.0643.59 ▲2.05
Dashboard /wp-admin2,217 ▲295.79 ▼0.03128.20 ▲4.1748.74 ▲1.64
Posts /wp-admin/edit.php2,106 ▲142.06 ▲0.0647.06 ▲4.1940.64 ▼3.44
Add New Post /wp-admin/post-new.php1,609 ▲7620.59 ▼0.50688.24 ▼48.1478.00 ▲20.54
Media Library /wp-admin/upload.php1,402 ▲144.18 ▼0.15114.83 ▼7.0450.65 ▼9.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/flag-me/flag-me.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flag-me/admin/flag-me_admin.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
2 plugin tags: localization, internationalization

flag-me/flag-me.php Passed 13 tests

The main PHP script in "Flag Me" version 0.2 is automatically included on every request by WordPress
82 characters long description:
Flag Me enables you to add a country flag before the title of your posts or pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected272 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21256132
CSS118082
PO File2202258

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions8
▷ Named functions8100.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
18 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/en.png1.73KB0.99KB▼ 42.60%
icons/de.png1.13KB0.39KB▼ 65.11%
icons/zh.png0.46KB0.51KB0.00%
icons/pt.png0.97KB0.93KB▼ 4.02%
icons/ru.png1.08KB0.29KB▼ 73.01%