90% post-announcement

Code Review | Post Announcement

WordPress plugin Post Announcement scored90%from 54 tests.

About plugin

  • Plugin page: post-announcement
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8
  • WordPress version: 6.3.1
  • First release: Dec 31, 2013
  • Latest release: Dec 31, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.57ms] Passed 4 tests

Server-side resources used by Post Announcement
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0340.94 ▲2.05
Dashboard /wp-admin3.33 ▲0.0343.90 ▼2.76
Posts /wp-admin/edit.php3.38 ▲0.0346.06 ▼0.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.57 ▼5.16
Media Library /wp-admin/upload.php3.25 ▲0.0336.14 ▲1.85
Post Announcement /wp-admin/options-general.php?page=post-announcement/post-announcement-menu.php3.2230.75

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
buffercode_post_announcement_font_color
widget_recent-posts
buffercode_post_announcement_bg_color
widget_recent-comments
db_upgraded
buffercode_post_announcement_custom_heading
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Post Announcement
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.35 ▼1.034.76 ▲2.8844.48 ▲1.30
Dashboard /wp-admin2,209 ▲185.86 ▲0.02104.66 ▲1.8240.17 ▼4.09
Posts /wp-admin/edit.php2,095 ▲62.01 ▲0.0141.03 ▲4.8936.09 ▼2.33
Add New Post /wp-admin/post-new.php6,298 ▲4,76419.21 ▼3.98915.67 ▲229.1169.99 ▲6.09
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0496.49 ▼6.8641.01 ▼2.91
Post Announcement /wp-admin/options-general.php?page=post-announcement/post-announcement-menu.php8251.8830.7126.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • buffercode_post_announcement_font_color
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • buffercode_post_announcement_custom_heading
    • widget_theysaidso_widget
    • buffercode_post_announcement_bg_color
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output 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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Post Announcement Output Screen), #2 (Post Announcement entry page.), #3 (Setting page for Post Revision)
The official readme.txt is a good inspiration

post-announcement/post-announcement.php Passed 13 tests

The main file in "Post Announcement" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
Through this plugin, user can able to show the announcement or notice to users based on each post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin928 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113837822
PHP24334106

PHP code Passed 2 tests

Analyzing 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.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png9.37KB3.77KB▼ 59.72%
js/hv.png2.80KB7.32KB0.00%
js/hs.png2.62KB7.54KB0.00%
screenshot-3.png19.38KB7.70KB▼ 60.27%
screenshot-1.png40.97KB19.42KB▼ 52.61%