78% diff-domain-new-tab

Code Review | Diff Domain New Tab

WordPress plugin Diff Domain New Tab scored78%from 54 tests.

About plugin

  • Plugin page: diff-domain-new-tab
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2017
  • Latest release: Jun 4, 2017
  • Number of updates: 14
  • Update frequency: every 3.6 days
  • Top authors: Alaanassar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Diff Domain New Tab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.44 ▼1.13
Dashboard /wp-admin3.33 ▼0.0251.27 ▼16.51
Posts /wp-admin/edit.php3.38 ▲0.0251.65 ▼0.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.08 ▼26.13
Media Library /wp-admin/upload.php3.25 ▲0.0235.97 ▼3.95
Diff Domain New Tab /wp-admin/options-general.php?page=diffDomainNewTab3.2232.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Diff Domain New Tab: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.73 ▼0.002.09 ▲0.3744.78 ▲1.53
Dashboard /wp-admin2,199 ▲225.68 ▲0.0190.52 ▼0.8540.49 ▼4.97
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0241.37 ▲5.2536.37 ▲1.31
Add New Post /wp-admin/post-new.php1,529 ▲122.85 ▼0.11614.94 ▼29.5648.29 ▼10.04
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.12106.32 ▲4.6047.94 ▲1.42
Diff Domain New Tab /wp-admin/options-general.php?page=diffDomainNewTab8482.0324.2230.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=diffDomainNewTab
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/diff-domain-new-tab/diffDomainNewTab.php:22

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can look at the official readme.txt

diff-domain-new-tab/diffDomainNewTab.php 92% from 13 tests

The main PHP file in "Diff Domain New Tab" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("diff-domain-new-tab.php" instead of "diffDomainNewTab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22016132
JavaScript17154

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin