83% wp-dpla

Code Review | WP DPLA

WordPress plugin WP DPLA scored83%from 54 tests.

About plugin

  • Plugin page: wp-dpla
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Sep 4, 2013
  • Number of updates: 7
  • Update frequency: every 12.0 days
  • Top authors: boonebgorges (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,072 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.99ms] Passed 4 tests

A check of server-side resources used by WP DPLA
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.76 ▼7.55
Dashboard /wp-admin3.34 ▲0.0450.93 ▼4.16
Posts /wp-admin/edit.php3.39 ▲0.0446.19 ▼5.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.34 ▲1.10
Media Library /wp-admin/upload.php3.26 ▲0.0442.13 ▲5.10
DPLA /wp-admin/options-general.php?page=wp-dpla3.2332.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP DPLA: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.53 ▼0.841.85 ▼0.2143.85 ▼3.50
Dashboard /wp-admin2,218 ▲335.84 ▼0.0598.85 ▼13.5142.31 ▼3.41
Posts /wp-admin/edit.php2,107 ▲181.99 ▼0.1336.97 ▼2.6138.63 ▲3.91
Add New Post /wp-admin/post-new.php1,528 ▼617.71 ▼5.39677.29 ▼17.5356.48 ▲0.89
Media Library /wp-admin/upload.php1,406 ▲184.26 ▲0.0699.98 ▼1.7543.82 ▼0.01
DPLA /wp-admin/options-general.php?page=wp-dpla8032.0525.2227.34

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-dpla/tests/bootstrap.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-dpla/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dpla/wp-dpla.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-dpla/tests/test-sample.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-dpla/includes/class-wp-dpla-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Tested up to: The plugin version is formatted incorrectly
  • Plugin Name: Please specify the plugin name on the first line ( === wp-dpla === )
The official readme.txt might help

wp-dpla/wp-dpla.php Passed 13 tests

The main file in "WP DPLA" v. 0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
Display related items from the Digital Public Library of America on your WP posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected791 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11168289673
Markdown228060
YAML15327
JSON10017
XML10014

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.28
Average class complexity8.44
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods5990.77%
▷ Protected methods69.23%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There were not PNG files found in your plugin