83% dark-press

Code Review | DarkPress

WordPress plugin DarkPress scored83%from 54 tests.

About plugin

  • Plugin page: dark-press
  • Plugin version: 0.3 [BETA]...
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: May 29, 2019
  • Latest release: Jun 7, 2019
  • Number of updates: 8
  • Update frequency: every 1.1 days
  • Top authors: neerfix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by DarkPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.19 ▼5.82
Dashboard /wp-admin3.31 ▼0.0446.42 ▼13.03
Posts /wp-admin/edit.php3.36 ▲0.0042.81 ▲0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.29 ▼12.22
Media Library /wp-admin/upload.php3.23 ▲0.0035.01 ▲3.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for DarkPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.19 ▼1.111.91 ▲0.1443.49 ▼2.38
Dashboard /wp-admin2,205 ▲175.79 ▲0.8998.01 ▼8.4737.80 ▼2.77
Posts /wp-admin/edit.php2,091 ▲22.01 ▲0.0035.55 ▼0.7533.59 ▲0.29
Add New Post /wp-admin/post-new.php1,516 ▲222.91 ▲5.24667.14 ▼23.7466.27 ▲5.93
Media Library /wp-admin/upload.php1,390 ▲54.24 ▲0.0297.31 ▲0.7044.63 ▲2.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dark-press/acp.php:36

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #3, #4, #5 in dark-press/assets to your readme.txt
  • Screenshots: Screenshot #1 (DashBoard) image not found
You can look at the official readme.txt

dark-press/acp.php 85% from 13 tests

The primary PHP file in "DarkPress" version 0.3 [BETA]... is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dark-press.php" instead of "acp.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "0.3 [BETA]...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected118 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS12912111
PHP13276
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.80MB with 0.61MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png322.11KB74.63KB▼ 76.83%
screenshot-1.png499.75KB128.30KB▼ 74.33%