84% sponsored-article-content

Code Review | Sponsored Article Content

WordPress plugin Sponsored Article Content scored84%from 54 tests.

About plugin

  • Plugin page: sponsored-article...
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: Jan 9, 2015
  • Number of updates: 2
  • Update frequency: every 50.0 days
  • Top authors: endocreative (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,093 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.12ms] Passed 4 tests

Server-side resources used by Sponsored Article Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0527.94 ▼11.61
Dashboard /wp-admin3.34 ▼0.0051.64 ▼13.91
Posts /wp-admin/edit.php3.39 ▲0.0448.35 ▼0.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.39 ▼13.31
Media Library /wp-admin/upload.php3.27 ▲0.0437.88 ▼1.66
Sponsored Article /wp-admin/options-general.php?page=sponsored-article-content/sponsored-article-content.php3.2435.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Sponsored Article Content: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.28 ▼1.284.49 ▲2.7942.85 ▲2.89
Dashboard /wp-admin2,218 ▲405.76 ▲0.1094.84 ▼12.2342.86 ▼1.85
Posts /wp-admin/edit.php2,125 ▲282.25 ▲0.3138.84 ▲1.2335.45 ▼0.81
Add New Post /wp-admin/post-new.php6,248 ▲4,72218.81 ▼4.48963.03 ▲273.6041.34 ▼19.50
Media Library /wp-admin/upload.php1,426 ▲294.47 ▲0.25103.06 ▼15.3845.23 ▼4.10
Sponsored Article /wp-admin/options-general.php?page=sponsored-article-content/sponsored-article-content.php9172.4948.1724.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 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 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sponsored-article-content/sponsored-article-content.php:12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: sponsored, native ad, advertising

sponsored-article-content/sponsored-article-content.php Passed 13 tests

"Sponsored Article Content" version 1.02's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
Add native ad functionality to your site by marking posts and articles as sponsored

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin198 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16415171
Markdown111024
JavaScript1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin