78% pure-feed-widget

Code Review | Pure Feed Widget

WordPress plugin Pure Feed Widget scored78%from 54 tests.

About plugin

  • Plugin page: pure-feed-widget
  • Plugin version: 0.2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 22, 2019
  • Latest release: Aug 22, 2019
  • Number of updates: 80
  • Update frequency: every 0.1 days
  • Top authors: xmacex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.77ms] Passed 4 tests

An overview of server-side resources used by Pure Feed Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.95 ▲4.77
Dashboard /wp-admin3.36 ▲0.0247.07 ▼12.17
Posts /wp-admin/edit.php3.41 ▲0.0642.72 ▼4.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0678.55 ▼18.76
Media Library /wp-admin/upload.php3.28 ▲0.0632.56 ▲0.09

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Pure Feed Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.20 ▼1.202.05 ▲0.3245.03 ▲3.02
Dashboard /wp-admin2,206 ▲244.84 ▼1.06104.09 ▲4.1741.86 ▼0.36
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0434.22 ▼3.4733.42 ▼1.00
Add New Post /wp-admin/post-new.php1,535 ▲2123.30 ▲5.70668.33 ▲11.7653.79 ▼5.20
Media Library /wp-admin/upload.php1,388 ▼04.34 ▲0.0993.54 ▼8.5041.57 ▼1.01

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_pure_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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× PHP files output text when accessed directly:
    • > /wp-content/plugins/pure-feed-widget/tests/bootstrap.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(PureWsRest.php): failed to open stream: No such file or directory in wp-content/plugins/pure-feed-widget/tests/test-purewsrest.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'PureWsRest.php' (include_path='.:/usr/share/php') in wp-content/plugins/pure-feed-widget/tests/test-publication.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pure-feed-widget/tests/test-parsing-pure-wsrest-response.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pure-feed-widget/class-pure-widget.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'PureWsRest.php' (include_path='.:/usr/share/php') in wp-content/plugins/pure-feed-widget/tests/test-purewsrest.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pure-feed-widget/tests/test-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pure-feed-widget/tests/test-sample.php:11
    • > PHP Warning
      require_once(PureWsRestRendering.php): failed to open stream: No such file or directory in wp-content/plugins/pure-feed-widget/tests/test-purewsrestrendering.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pure-feed-widget/class-pure-widget.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'PureWsRestRendering.php' (include_path='.:/usr/share/php') in wp-content/plugins/pure-feed-widget/tests/test-purewsrestrendering.php on line 6

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Pure offers rendering items in various bibliographical style. Below is example output with the [APA style](https://apastyle.apa.org/) style, without any fancy CSS.), #2 (Example output with the *short* style)
The official readme.txt is a good inspiration

pure-feed-widget/pure-feed-widget.php Passed 13 tests

"Pure Feed Widget" version 0.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
42 characters long description:
Render content from Elsevier Pure systems.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11,748 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
XML551211,017
PHP1293206491
Bourne Shell12111123
YAML17060
Markdown117055
Lisp1112

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.16
Average class complexity4.30
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3794.87%
▷ Protected methods00.00%
▷ Private methods25.13%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png80.75KB26.21KB▼ 67.54%
assets/screenshot-1.png115.08KB42.29KB▼ 63.25%