10% responsive-bit-announcements-manager

Code Review | Responsive Bit Announcement Manager

WordPress plugin Responsive Bit Announcement Manager scored 10% from 54 tests.

About plugin

  • Plugin page: responsive-bit-an...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4
  • WordPress version: 5.8.1
  • First release: Nov 17, 2012
  • Latest release: Nov 24, 2012
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: shafaatbinjaved (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,873 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/responsive-bit-announcements-manager/responsive_bit_announcements.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; ResponsiveBitAnnouncements has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼183.09ms] Passed 4 tests

A check of server-side resources used by Responsive Bit Announcement Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.82 ▼1.024.85 ▼28.48
Dashboard /wp-admin1.83 ▼1.225.81 ▼29.60
Posts /wp-admin/edit.php1.84 ▼1.276.03 ▼34.46
Add New Post /wp-admin/post-new.php1.83 ▼3.605.20 ▼634.62
Media Library /wp-admin/upload.php1.83 ▼1.175.08 ▼33.66
Announcements /wp-admin/edit.php?post_type=rb-announcements1.846.43
Announcement's usage guide /wp-admin/edit.php?post_type=rb-announcements&page=rb_announcements_guide1.845.41
Add New /wp-admin/post-new.php?post_type=rb-announcements1.846.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Bit Announcement Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,895 ▲29916.23 ▲0.7111.22 ▲2.3847.04 ▼2.08
Dashboard /wp-admin3,060 ▲1265.91 ▼0.04134.19 ▼4.96127.29 ▲3.77
Posts /wp-admin/edit.php2,779 ▲402.69 ▲0.0167.00 ▲4.7987.78 ▼1.75
Add New Post /wp-admin/post-new.php1,698 ▲2819.08 ▲0.71392.57 ▲35.12105.83 ▼8.80
Media Library /wp-admin/upload.php1,847 ▲405.01 ▼0.04155.51 ▼1.79119.93 ▲2.43
Announcements /wp-admin/edit.php?post_type=rb-announcements1,4362.6161.7078.68
Announcement's usage guide /wp-admin/edit.php?post_type=rb-announcements&page=rb_announcements_guide1,0682.1454.2670.47
Add New /wp-admin/post-new.php?post_type=rb-announcements2,9539.17222.50138.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/responsive-bit-announcements-manager/responsive_bit_announcements.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; ResponsiveBitAnnouncements has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=rb-announcements
    • > Deprecated in wp-content/plugins/responsive-bit-announcements-manager/responsive_bit_announcements.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; ResponsiveBitAnnouncements has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-bit-announcements-manager/responsive_bit_announcements.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Showing the add item for Announcements.), #2 (Showing admin screen for Annoucements.), #3 (Showing how to add annoucement date for Announcements.)
The official readme.txt is a good inspiration

responsive-bit-announcements-manager/responsive_bit_announcements.php 92% from 13 tests

This is the main PHP file of "Responsive Bit Announcement Manager" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("responsive-bit-announcements-manager.php" instead of "responsive_bit_announcements.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected462 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34628255
PHP12016181
CSS24426

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
18 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ffd27a_256x240.png4.27KB4.11KB▼ 3.78%
screenshot-3.png12.52KB7.42KB▼ 40.75%
css/images/ui-icons_228ef1_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
css/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%