68% press-release-newsroom

Code Review | Press Release Newsroom

WordPress plugin Press Release Newsroom scored68%from 54 tests.

About plugin

  • Plugin page: press-release-new...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2019
  • Latest release: Jun 9, 2023
  • Number of updates: 56
  • Update frequency: every 27.5 days
  • Top authors: lightimagemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,020 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼39.18ms] Passed 4 tests

Server-side resources used by Press Release Newsroom
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.1448.00 ▼0.70
Dashboard /wp-admin3.40 ▼0.2327.32 ▼40.97
Posts /wp-admin/edit.php3.40 ▼0.2830.89 ▼24.75
Add New Post /wp-admin/post-new.php3.40 ▼2.7425.10 ▼81.06
Media Library /wp-admin/upload.php3.40 ▼0.0928.59 ▼9.92

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Press Release Newsroom
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.54 ▼0.768.58 ▲6.4747.79 ▲5.76
Dashboard /wp-admin2,221 ▲505.63 ▼0.0591.07 ▼2.6138.86 ▼1.61
Posts /wp-admin/edit.php2,120 ▲202.01 ▼0.0539.65 ▲2.4936.46 ▼2.93
Add New Post /wp-admin/post-new.php1,546 ▲1423.18 ▼0.26683.29 ▲17.3053.76 ▲1.00
Media Library /wp-admin/upload.php1,417 ▲204.19 ▼0.0397.14 ▼1.4243.76 ▼0.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/press-release-newsroom/inc/admin/class-admin.php+117
    Undefined variable: ajax_form_page_hook
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/press-release-newsroom/inc/frontend/views/html-prwirepro-press-release-newsroom-frontend-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/press-release-newsroom/inc/admin/views/partials-html-form-view.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Main screen)
Please take inspiration from this readme.txt

press-release-newsroom/press-release-newsroom.php 92% from 13 tests

Analyzing the main PHP file in "Press Release Newsroom" version 1.0.0
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 239 characters long)

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
No dangerous file extensions were detected400 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP132,469515334
HTML15041
JavaScript2123625
CSS22100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/title.png6.69KB3.82KB▼ 42.81%