77% dreamapi

Code Review | DreamAPI

WordPress plugin DreamAPI scored77%from 54 tests.

About plugin

  • Plugin page: dreamapi
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 4, 2021
  • Latest release: Jan 4, 2021
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: notetoservices (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.58ms] Passed 4 tests

A check of server-side resources used by DreamAPI
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.70 ▼1.42
Dashboard /wp-admin3.46 ▲0.1650.38 ▼4.69
Posts /wp-admin/edit.php3.58 ▲0.2249.95 ▲1.64
Add New Post /wp-admin/post-new.php6.04 ▲0.1593.14 ▼1.84
Media Library /wp-admin/upload.php3.39 ▲0.1637.89 ▲3.65
DreamAPI /wp-admin/tools.php?page=dreamapi_dreamobjects3.3532.68
DreamObjects Media /wp-admin/upload.php?page=dreamobjects-media-library3.3331.48

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for DreamAPI
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.23 ▼1.141.95 ▲0.0242.95 ▼3.12
Dashboard /wp-admin2,222 ▲345.85 ▲0.8996.33 ▼21.3637.36 ▼6.81
Posts /wp-admin/edit.php2,102 ▲131.99 ▼0.0539.71 ▲4.9036.10 ▲2.84
Add New Post /wp-admin/post-new.php1,548 ▲1518.51 ▼4.59619.80 ▼81.5551.45 ▼6.02
Media Library /wp-admin/upload.php1,403 ▲214.19 ▼0.0293.42 ▼3.7242.35 ▼3.06
DreamAPI /wp-admin/tools.php?page=dreamapi_dreamobjects8242.2124.6331.76
DreamObjects Media /wp-admin/upload.php?page=dreamobjects-media-library6721.536.2417.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dreamapi/inc/dreamapiMedia.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=dreamobjects-media-library
    • > Network (severe)
    wp-content/plugins/dreamapi/assets/css/popup.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots lack descriptions #7, #9 in dreamapi/assets to your readme.txt
The official readme.txt might help

dreamapi/dreamapi.php 92% from 13 tests

"DreamAPI" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin741 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4262414740
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity28.00
▷ Minimum class complexity7.00
▷ Maximum class complexity44.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods2880.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected