90% dx-sources

Code Review | DX Sources

WordPress plugin DX Sources scored90%from 54 tests.

About plugin

  • Plugin page: dx-sources
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Oct 6, 2020
  • Number of updates: 11
  • Update frequency: every 148.6 days
  • Top authors: xavortm (63.64%)devrix (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,183 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.05MB] [CPU: ▼3.68ms] Passed 4 tests

This is a short check of server-side resources used by DX Sources
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.67 ▼5.36
Dashboard /wp-admin3.36 ▲0.0546.54 ▼4.70
Posts /wp-admin/edit.php3.47 ▲0.1149.43 ▼2.48
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.81 ▼2.16
Media Library /wp-admin/upload.php3.28 ▲0.0536.15 ▲0.14
DX Sources /wp-admin/options-general.php?page=dx-sources3.2534.43

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by DX Sources
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.24 ▼1.111.79 ▼0.1543.58 ▼4.20
Dashboard /wp-admin2,215 ▲275.01 ▼0.89110.66 ▼6.2640.95 ▼3.63
Posts /wp-admin/edit.php2,095 ▲92.01 ▲0.0240.05 ▲3.6636.09 ▲3.16
Add New Post /wp-admin/post-new.php6,244 ▲4,71126.08 ▲3.00852.72 ▲161.4556.35 ▼0.29
Media Library /wp-admin/upload.php1,394 ▲64.14 ▼0.10100.43 ▼1.8244.40 ▲0.46
DX Sources /wp-admin/options-general.php?page=dx-sources7912.0528.5324.30

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: admin, dashboard, post, content

dx-sources/dx-sources.php 92% from 13 tests

This is the main PHP file of "DX Sources" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected341 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5107115304
CSS17037

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.00
▷ Minimum class complexity11.00
▷ Maximum class complexity18.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1466.67%
▷ Protected methods00.00%
▷ Private methods733.33%
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

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