84% dvs-api

Code Review | DVS API

WordPress plugin DVS API scored84%from 54 tests.

About plugin

  • Plugin page: dvs-api
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-1.2.2
  • WordPress version: 6.3.1
  • First release: May 14, 2015
  • Latest release: May 21, 2015
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: vdrizheruk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.52ms] Passed 4 tests

Analyzing server-side resources used by DVS API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.80 ▼8.12
Dashboard /wp-admin3.33 ▼0.0242.93 ▼21.26
Posts /wp-admin/edit.php3.38 ▲0.0244.23 ▼4.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.67 ▼4.55
Media Library /wp-admin/upload.php3.25 ▲0.0237.19 ▲4.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DVS API
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼0.965.97 ▲3.7736.87 ▼9.04
Dashboard /wp-admin2,206 ▲185.84 ▼0.04100.18 ▼15.6638.81 ▼2.57
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0536.35 ▼2.1633.37 ▼4.36
Add New Post /wp-admin/post-new.php1,514 ▼2817.52 ▼0.55699.36 ▲91.6660.12 ▲8.08
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0192.52 ▼12.7943.54 ▲1.05

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dvs-api/dvs-api.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

dvs-api/dvs-api.php Passed 13 tests

The main file in "DVS API" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
32 characters long description:
This plugin for provide json api

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
There were no executable files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2154890

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods450.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin