78% developer-pack

Code Review | Developer Pack

WordPress plugin Developer Pack scored78%from 54 tests.

About plugin

  • Plugin page: developer-pack
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 1, 2018
  • Latest release: Feb 12, 2019
  • Number of updates: 8
  • Update frequency: every 9.3 days
  • Top authors: nguyenhongphat0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /828 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.75ms] Passed 4 tests

Server-side resources used by Developer Pack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.17 ▲2.15
Dashboard /wp-admin3.35 ▲0.0148.48 ▼8.09
Posts /wp-admin/edit.php3.40 ▲0.0450.34 ▲2.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.28 ▼11.16
Media Library /wp-admin/upload.php3.28 ▲0.0436.59 ▲2.83
Developer Pack /wp-admin/tools.php?page=developer-pack/developerpack.php3.4848.66

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Developer Pack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.37 ▲0.041.79 ▲0.0944.28 ▲4.24
Dashboard /wp-admin2,210 ▲255.80 ▼0.09100.15 ▼0.8639.04 ▼1.53
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0139.36 ▲3.6233.66 ▲1.74
Add New Post /wp-admin/post-new.php1,536 ▲1723.00 ▼0.38650.28 ▼39.6753.67 ▼4.04
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.00102.11 ▲0.5143.23 ▲0.29
Developer Pack /wp-admin/tools.php?page=developer-pack/developerpack.php1,5589.29237.01103.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/developer-pack/ajax.php+149
    scandir(wp-content/plugins/developer-pack/zip/): failed to open dir: No such file or directory
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/developer-pack/ajax.php+149
    scandir(): (errno 2): No such file or directory
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/developer-pack/ajax.php+149
    array_diff(): Expected parameter 1 to be an array, bool given
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/developer-pack/ajax.php+151
    Invalid argument supplied for foreach()

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Javascript (severe) in unknown
    /wp-includes/js/admin-bar.min.js?ver=6.3.1 1:2978 Uncaught TypeError: u.hoverintent is not a function
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: f.find(...).hoverIntent is not a function" "TypeError: f.find(...).hoverIntent is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/js/common.min.js?ver=6.3.1:2:12296)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: f.find(...).hoverIntent is not a function
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/loader.js 26:120 "Duplicate definition of module 'vs/editor/editor.main'"
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/editor/editor.main.js 210:8 "Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq"
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/editor/editor.main.js 210:201 "Failed to construct 'Worker': Script at 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/base/worker/workerMain.js#editorWorkerService' cannot be accessed from origin ''."
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/editor/editor.main.js 210:201 "Failed to construct 'Worker': Script at 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/base/worker/workerMain.js#json' cannot be accessed from origin ''."
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/loader.js 26:120 "Duplicate definition of module 'jsonc-parser/impl/scanner'"
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/loader.js 26:120 "Duplicate definition of module 'jsonc-parser/impl/format'"
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/loader.js 26:120 "Duplicate definition of module 'jsonc-parser/impl/parser'"
    • > GET request to /wp-admin/tools.php?page=developer-pack/developerpack.php
    • > Console-api (warning) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.6/min/vs/loader.js 26:120 "Duplicate definition of module 'jsonc-parser/impl/edit'"

Optimizations

Plugin configuration 93% 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: editor, freelancer, developer, code

developer-pack/developerpack.php 85% from 13 tests

The main PHP script in "Developer Pack" version 1.3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("developer-pack.php" instead of "developerpack.php")
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin763 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33023684
JavaScript10057
YAML13022

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.31
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin