74% post-flagger

Code Review | Post Flagger

WordPress plugin Post Flagger scored74%from 54 tests.

About plugin

  • Plugin page: post-flagger
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2015
  • Latest release: Jun 26, 2015
  • Number of updates: 18
  • Update frequency: every 4.3 days
  • Top authors: nosoycesaros (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,767 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.42ms] Passed 4 tests

Analyzing server-side resources used by Post Flagger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.93 ▼8.13
Dashboard /wp-admin3.44 ▲0.0942.10 ▼17.67
Posts /wp-admin/edit.php3.54 ▲0.1845.22 ▲0.81
Add New Post /wp-admin/post-new.php6.11 ▲0.2289.36 ▼8.68
Media Library /wp-admin/upload.php3.38 ▲0.1535.79 ▲3.51
Post Flags /wp-admin/options-general.php?page=post-flagger-options3.3128.70

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: 13 new files
Database: 1 new table, 6 new options
New tables
wp_post_flagger
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Post Flagger
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.55 ▼0.765.28 ▲3.5738.52 ▼5.81
Dashboard /wp-admin2,210 ▲225.85 ▲0.94107.49 ▼12.9843.90 ▼1.39
Posts /wp-admin/edit.php2,093 ▲12.05 ▼0.0939.64 ▲1.5335.99 ▼0.71
Add New Post /wp-admin/post-new.php1,545 ▲2618.40 ▼4.91638.17 ▲0.0857.45 ▲0.88
Media Library /wp-admin/upload.php1,389 ▼24.20 ▼0.02102.65 ▲2.6648.99 ▲3.08
Post Flags /wp-admin/options-general.php?page=post-flagger-options9592.0724.9024.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_post_flagger
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/post-flagger/views/new.php:1
    • > 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/post-flagger/classes/flags-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'PF_Flags_Table' not found in wp-content/plugins/post-flagger/views/list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/post-flagger/views/edit.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/post-flagger/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-flagger/post-flagger.php:12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-flagger/classes/flags-table.php on line 4
    • > 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/post-flagger/classes/flags-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

post-flagger/post-flagger.php 92% from 13 tests

"Post Flagger" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

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
Good job! No executable or dangerous file extensions detected609 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6168285483
Markdown128050
PO File1152445
JavaScript2142230
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin