10% doi-indentifier

Code Review | DOI Identifier

WordPress plugin DOI Identifier scored10%from 54 tests.

About plugin

  • Plugin page: doi-indentifier
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Dec 6, 2017
  • Latest release: Dec 6, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: haseebayazi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /877 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/doi-indentifier/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; doiidentifier has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼48.39ms] Passed 4 tests

An overview of server-side resources used by DOI Identifier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.81 ▼29.70
Dashboard /wp-admin2.08 ▼1.2310.89 ▼34.94
Posts /wp-admin/edit.php2.08 ▼1.286.41 ▼40.14
Add New Post /wp-admin/post-new.php2.08 ▼3.815.77 ▼88.76
Media Library /wp-admin/upload.php2.08 ▼1.155.38 ▼25.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_doiidentifier
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DOI Identifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.101.79 ▲0.1146.30 ▲7.06
Dashboard /wp-admin2,195 ▲145.50 ▼0.2283.39 ▼13.5436.71 ▼6.91
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0133.95 ▼3.0730.50 ▼2.88
Add New Post /wp-admin/post-new.php1,526 ▼223.52 ▲0.55677.15 ▲10.0557.11 ▲0.89
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0096.59 ▼0.4345.83 ▼0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/doi-indentifier/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; doiidentifier has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_doiidentifier
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/doi-indentifier/index.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: digital object identifier, research article, doi, journal, research paper...

doi-indentifier/index.php 92% from 13 tests

Analyzing the main PHP file in "DOI Identifier" version 1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("doi-indentifier.php" instead of "index.php")

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
There were no executable files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113939

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ 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%
Functions0
▷ Named functions00.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 are no PNG files in this plugin