83% post-introduction-disclaimer-announcements-widget

Code Review | Post Intro Disclaimer Announcements

WordPress plugin Post Intro Disclaimer Announcements scored 83% from 54 tests.

About plugin

  • Plugin page: post-introduction...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6
  • WordPress version: 6.3.1
  • First release: Aug 26, 2016
  • Latest release: Sep 1, 2016
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: FinchPS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 880 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.42ms] Passed 4 tests

A check of server-side resources used by Post Intro Disclaimer Announcements
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.13 ▼0.12
Dashboard /wp-admin3.36 ▲0.0545.26 ▼8.68
Posts /wp-admin/edit.php3.41 ▲0.0542.73 ▼7.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.95 ▼21.48
Media Library /wp-admin/upload.php3.28 ▲0.0538.77 ▲4.98

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_pida_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Post Intro Disclaimer Announcements: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.72 ▼0.864.53 ▲2.8044.28 ▼3.15
Dashboard /wp-admin2,209 ▲214.88 ▼0.01100.56 ▼16.0837.74 ▼6.21
Posts /wp-admin/edit.php2,086 ▼02.01 ▲0.0034.24 ▼2.8134.19 ▲2.36
Add New Post /wp-admin/post-new.php1,533 ▼1023.49 ▲5.35682.29 ▲67.6757.55 ▲4.47
Media Library /wp-admin/upload.php1,382 ▼34.23 ▲0.0396.66 ▼7.6340.64 ▼5.94

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_intro_disclaimer_announcement_widget\\plugin_dir_path() in wp-content/plugins/post-introduction-disclaimer-announcements-widget/init.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-introduction-disclaimer-announcements-widget/inc/main.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Drag the new PIDA widget to the new PIDA sidebar.), #2 (Choose your settings (or just keep the defaults). You can use the color sliders to set the colors, or manually enter a hex code.), #3 (Final result at the beginning of your content on post pages.)
You can look at the official readme.txt

post-introduction-disclaimer-announcements-widget/init.php 85% from 13 tests

The entry point to "Post Intro Disclaimer Announcements" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-introduction-disclaimer-announcements-widget.php" instead of "init.php")

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 plugin181 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35765154
Markdown114027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
PNG images were not found in this plugin