10% pressroom-by-newswire

Code Review | PressRoom by Newswire

WordPress plugin PressRoom by Newswire scored10%from 54 tests.

About plugin

  • Plugin page: pressroom-by-news...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Aug 14, 2015
  • Latest release: Dec 9, 2015
  • Number of updates: 14
  • Update frequency: every 9.2 days
  • Top authors: dougatnewswire (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10+ active /5,121 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/pressroom-by-newswire/includes/activate.php+144
    'continue' not in the 'loop' or 'switch' context

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.30ms] Passed 4 tests

Analyzing server-side resources used by PressRoom by Newswire
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.24 ▼0.55
Dashboard /wp-admin3.31 ▲0.0045.70 ▼0.14
Posts /wp-admin/edit.php3.36 ▲0.0047.24 ▼0.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.38 ▲4.46
Media Library /wp-admin/upload.php3.23 ▲0.0033.33 ▼0.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 180 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

PressRoom by Newswire: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.211.76 ▼0.2039.08 ▼3.08
Dashboard /wp-admin2,206 ▲185.86 ▼0.04111.24 ▼0.4237.70 ▼3.40
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0439.48 ▲0.1134.07 ▲3.00
Add New Post /wp-admin/post-new.php1,542 ▲618.23 ▼4.89593.13 ▼64.3550.10 ▼4.79
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0599.32 ▼18.6345.70 ▼4.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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 fix the following items
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/feed.php' (include_path='.:/usr/share/php') in wp-content/plugins/pressroom-by-newswire/includes/cron/newswire-submission.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pressroom-by-newswire/includes/newsroom/actions/republish.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pressroom-by-newswire/includes/pressroom/templates/pressroom-pin_as_latestpr.php:3
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/pressroom-by-newswire/includes/cron/rss-import.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pressroom-by-newswire/includes/pressroom/templates/pressroom-pin_as_image.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pressroom-by-newswire/includes/cron/newswire-freesites.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pressroom-by-newswire/includes/pressroom/templates/pressroom-pr.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pressroom-by-newswire/includes/media.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pressroom-by-newswire/includes/roles.php:7
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/pressroom-by-newswire/includes/cron/newswire-submission.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #27 (latest pr block), #28 (latest pr block)
You can take inspiration from this readme.txt

pressroom-by-newswire/pressroom.php 85% from 13 tests

The primary PHP file in "PressRoom by Newswire" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pressroom-by-newswire.php" instead of "pressroom.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected25,263 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
CSS3176648813,032
PHP653,1433,3719,723
JavaScript185356592,060
SVG200412
HTML12036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity35.36
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods183
▷ Static methods10.55%
▷ Public methods17595.63%
▷ Protected methods42.19%
▷ Private methods42.19%
Functions268
▷ Named functions268100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants3391.67%
▷ Class constants38.33%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
30 PNG files occupy 0.70MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
assets/images/globe-icon.png0.91KB0.86KB▼ 5.39%
assets/js/nivo-slider/themes/dark/bullets.png3.07KB0.42KB▼ 86.27%
assets/css/jquery-ui/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/js/nivo-slider/themes/default/arrows.png0.80KB0.51KB▼ 36.53%