78% newstream

Code Review | Newstream

WordPress plugin Newstream scored78%from 54 tests.

About plugin

  • Plugin page: newstream
  • Plugin version: 1.0a...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jan 25, 2016
  • Latest release: Jan 26, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: pseudokool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Newstream
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0245.89 ▼0.30
Dashboard /wp-admin3.58 ▼0.0551.39 ▼20.31
Posts /wp-admin/edit.php3.70 ▲0.0254.13 ▲3.36
Add New Post /wp-admin/post-new.php6.16 ▲0.0288.07 ▼16.59
Media Library /wp-admin/upload.php3.51 ▲0.0241.20 ▼2.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Newstream
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.47 ▲0.101.95 ▲0.0943.17 ▼2.39
Dashboard /wp-admin2,195 ▲155.61 ▲0.0589.96 ▼4.7838.46 ▼10.51
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0239.88 ▲0.7034.92 ▼4.28
Add New Post /wp-admin/post-new.php1,532 ▲623.12 ▲5.52676.19 ▼28.8458.12 ▲2.36
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.02102.21 ▼14.5149.02 ▲0.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_newstream_widget
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/newstream/newstream.php
    • > /wp-content/plugins/newstream/uinstall.php
    • > /wp-content/plugins/newstream/includes/newstream.ui.inc.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: lies in wp-content/plugins/newstream/includes/newstream.ui.inc.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (To be added in `/assets/screenshot-1.png`)
The official readme.txt might help

newstream/newstream.php 92% from 13 tests

This is the main PHP file of "Newstream" version 1.0a..., 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:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.0a...")

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
Good job! No executable or dangerous file extensions detected108 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4394066
Markdown126042

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
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%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin