74% fley-sponsored-posts

Code Review | fley Sponsored Posts

WordPress plugin fley Sponsored Posts scored 74% from 54 tests.

About plugin

  • Plugin page: fley-sponsored-posts
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Mar 17, 2020
  • Number of updates: 6
  • Update frequency: every 65.2 days
  • Top authors: flodji (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 943 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.84MB] [CPU: ▼32.80ms] Passed 4 tests

A check of server-side resources used by fley Sponsored Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.38 ▲1.59
Dashboard /wp-admin3.11 ▼0.2029.51 ▼23.57
Posts /wp-admin/edit.php3.11 ▼0.2523.82 ▼24.53
Add New Post /wp-admin/post-new.php3.11 ▼2.7824.38 ▼71.68
Media Library /wp-admin/upload.php3.11 ▼0.1222.18 ▼11.42
fley Sponsored Posts /wp-admin/options-general.php?page=fley-sponsored-posts/fley-sponsored-posts.php3.1129.03

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

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

Browser metrics Passed 4 tests

A check of browser resources used by fley Sponsored Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.50 ▼0.911.63 ▼0.1840.00 ▼5.45
Dashboard /wp-admin2,229 ▲415.23 ▼0.55108.02 ▲9.0243.01 ▼0.39
Posts /wp-admin/edit.php2,117 ▲282.31 ▲0.1440.65 ▲0.7432.13 ▼1.33
Add New Post /wp-admin/post-new.php6,597 ▲5,08320.17 ▲2.56897.05 ▲215.7442.08 ▼16.04
Media Library /wp-admin/upload.php1,411 ▲264.46 ▲0.2397.75 ▼4.0743.86 ▲2.13
fley Sponsored Posts /wp-admin/options-general.php?page=fley-sponsored-posts/fley-sponsored-posts.php1,2712.6152.9028.62

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=fley-sponsored-posts/fley-sponsored-posts.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg), #3 (screenshot-3.jpg)
The official readme.txt might help

fley-sponsored-posts/fley-sponsored-posts.php 92% from 13 tests

The main PHP script in "fley Sponsored Posts" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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 detected423 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23511323
PO File18414585
CSS10010
JavaScript1105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.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