78% sponsored-post-hinweis

Code Review | Sponsored Post Hinweis

WordPress plugin Sponsored Post Hinweis scored78%from 54 tests.

About plugin

  • Plugin page: sponsored-post-hi...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: Oct 27, 2016
  • Number of updates: 24
  • Update frequency: every 48.5 days
  • Top authors: Goerni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /786 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Sponsored Post Hinweis
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.87 ▼1.18
Dashboard /wp-admin3.33 ▲0.0343.26 ▼9.69
Posts /wp-admin/edit.php3.38 ▲0.0243.09 ▼3.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.23 ▼2.28
Media Library /wp-admin/upload.php3.25 ▲0.0235.04 ▲2.87
Sponsored Post Hinweis Optionen /wp-admin/options-general.php?page=sponsoredFunktionen3.1927.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sponsored Post Hinweis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.361.69 ▲0.0444.30 ▲0.50
Dashboard /wp-admin2,207 ▲335.83 ▲0.9394.42 ▼11.7240.34 ▼0.56
Posts /wp-admin/edit.php2,072 ▼172.00 ▼0.0036.82 ▼0.4132.11 ▲0.18
Add New Post /wp-admin/post-new.php1,536 ▲322.96 ▼0.15650.63 ▼41.4960.68 ▲2.16
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0593.65 ▼7.0443.84 ▼2.08
Sponsored Post Hinweis Optionen /wp-admin/options-general.php?page=sponsoredFunktionen8372.0222.6524.32

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sponsoredFunktionen
    • > Notice in wp-content/plugins/sponsored-post-hinweis/contenthinweis.php+122
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=sponsoredFunktionen
    • > Notice in wp-content/plugins/sponsored-post-hinweis/contenthinweis.php+128
    Undefined variable: outputa

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sponsored-post-hinweis/contenthinweis.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === sponsored-post-hinweis === )
You can take inspiration from this readme.txt

sponsored-post-hinweis/contenthinweis.php 85% from 13 tests

The main PHP script in "Sponsored Post Hinweis" version 1.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sponsored-post-hinweis.php" instead of "contenthinweis.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 281 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
Success! There were no dangerous files found in this plugin104 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1723104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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