84% better-press-newsfeed

Code Review | Better Press Newsfeed

WordPress plugin Better Press Newsfeed scored84%from 54 tests.

About plugin

  • Plugin page: better-press-news...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Apr 17, 2014
  • Number of updates: 5
  • Update frequency: every 4.4 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,323 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.29ms] Passed 4 tests

Analyzing server-side resources used by Better Press Newsfeed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.29 ▲2.50
Dashboard /wp-admin5.70 ▲2.3610,055.17 ▲9,997.23
Posts /wp-admin/edit.php3.38 ▲0.0244.51 ▼2.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.92 ▼5.31
Media Library /wp-admin/upload.php3.25 ▲0.0232.22 ▲0.35

Server storage [IO: ▲0.01MB] [DB: ▲0.48MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Better Press Newsfeed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲12214.17 ▼0.181.56 ▼0.1837.95 ▼0.39
Dashboard /wp-admin2,296 ▲1155.59 ▼0.1482.32 ▼15.9642.85 ▲2.16
Posts /wp-admin/edit.php2,100 ▲181.96 ▼0.0533.67 ▼4.6033.52 ▼0.03
Add New Post /wp-admin/post-new.php1,528 ▼023.41 ▲0.33581.08 ▼95.6355.52 ▲3.70
Media Library /wp-admin/upload.php1,400 ▼04.15 ▲0.0097.36 ▼4.0741.13 ▼7.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/better-press-newsfeed/better-press-newsfeed.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: wp tavern, post status, news feeds, dashboard widgets

better-press-newsfeed/better-press-newsfeed.php 92% from 13 tests

The main PHP file in "Better Press Newsfeed" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0" instead of "3.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1628288

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected