84% diver

Code Review | Diver

WordPress plugin Diver scored84%from 54 tests.

About plugin

  • Plugin page: diver
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 19, 2015
  • Latest release: Feb 4, 2016
  • Number of updates: 5
  • Update frequency: every 76.4 days
  • Top authors: leandroarndt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Diver
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.89 ▼1.32
Dashboard /wp-admin3.31 ▼0.0447.37 ▼13.07
Posts /wp-admin/edit.php3.36 ▲0.0042.70 ▼4.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.11 ▼10.55
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▼1.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Diver
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▲0.161.92 ▲0.3039.57 ▼0.52
Dashboard /wp-admin2,198 ▲215.63 ▲0.0185.78 ▼3.5439.41 ▼0.31
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0633.05 ▼1.0032.55 ▼1.25
Add New Post /wp-admin/post-new.php1,526 ▼923.22 ▲4.76654.07 ▲46.5650.11 ▼8.17
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.02103.19 ▲7.8144.10 ▲2.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/diver/diver.php on line 38
    • > PHP Warning
      require_once(ABSPATHWPINC/media.php): failed to open stream: No such file or directory in wp-content/plugins/diver/diver.php on line 38
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/diver/diver.php on line 38
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/diver/diver.php on line 38

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: formatting, tag, format, html, html tag...

diver/diver.php Passed 13 tests

The principal PHP file in "Diver" v. 1.0 is loaded by WordPress automatically on each request
49 characters long description:
Adds HTML div tags directly in the visual editor.

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
Success! There were no dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1153329

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.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin