89% fotki-media-bot

Code Review | Fotki Media Bot

WordPress plugin Fotki Media Bot scored 89% from 54 tests.

About plugin

  • Plugin page: fotki-media-bot
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 10, 2018
  • Latest release: Apr 20, 2018
  • Number of updates: 8
  • Update frequency: every 1.5 days
  • Top authors: fotkin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 761 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.00MB] [CPU: ▼3.50ms] Passed 4 tests

Server-side resources used by Fotki Media Bot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.03 ▲1.15
Dashboard /wp-admin3.31 ▲0.0043.90 ▼10.33
Posts /wp-admin/edit.php3.36 ▲0.0045.02 ▲0.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.71 ▼5.47
Media Library /wp-admin/upload.php3.23 ▲0.0035.49 ▲1.64

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fotki Media Bot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼0.621.58 ▼0.5239.31 ▼10.43
Dashboard /wp-admin2,209 ▲184.81 ▼0.0596.43 ▼22.8140.78 ▼7.18
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0036.31 ▼0.6233.66 ▼2.62
Add New Post /wp-admin/post-new.php1,529 ▲618.32 ▼4.85659.37 ▼13.2051.41 ▼7.91
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.1298.19 ▼5.3243.93 ▼3.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in fotki-media-bot/assets to your readme.txt
You can take inspiration from this readme.txt

fotki-media-bot/fotki-media-bot.php 92% from 13 tests

Analyzing the main PHP file in "Fotki Media Bot" version 0.6
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin934 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP524128881
JavaScript111034
CSS13019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity39.25
▷ Minimum class complexity13.00
▷ Maximum class complexity90.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1640.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin