68% neulee

Code Review | Neulee API Wordpress plugin

WordPress plugin Neulee API Wordpress plugin scored68%from 54 tests.

About plugin

  • Plugin page: neulee
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Apr 6, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: magisterdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /628 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.20ms] Passed 4 tests

Analyzing server-side resources used by Neulee API Wordpress plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.48 ▼1.03
Dashboard /wp-admin3.45 ▲0.1442.55 ▼7.86
Posts /wp-admin/edit.php3.56 ▲0.2048.75 ▲1.14
Add New Post /wp-admin/post-new.php6.03 ▲0.1481.29 ▼8.06
Media Library /wp-admin/upload.php3.37 ▲0.1436.07 ▲0.14
Neulee Account /wp-admin/options-general.php?page=neulee/account3.3930.22
Neulee Solution /wp-admin/options-general.php?page=neulee/solution3.3934.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: 4 new tables, 6 new options
New tables
wp_neulee_solutions
wp_neulee_search
wp_neulee_packages
wp_neulee_login
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Neulee API Wordpress plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.58 ▼0.791.73 ▼0.1841.18 ▼8.21
Dashboard /wp-admin2,213 ▲254.84 ▼0.04105.24 ▼11.4639.04 ▼7.28
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0039.83 ▲1.9635.33 ▼1.94
Add New Post /wp-admin/post-new.php1,536 ▲323.34 ▲0.05629.48 ▼88.1962.37 ▲6.04
Media Library /wp-admin/upload.php1,401 ▲134.26 ▼0.0398.63 ▼8.1842.22 ▼6.10
Neulee Account /wp-admin/options-general.php?page=neulee/account9662.0326.5225.48
Neulee Solution /wp-admin/options-general.php?page=neulee/solution8842.0523.9834.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_neulee_packages
    • wp_neulee_login
    • wp_neulee_solutions
    • wp_neulee_search
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=neulee/solution
    • > Notice in wp-content/plugins/neulee/admin/partials/neulee-admin-solution.php+189
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/neulee/includes/class-neulee-activator.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/neulee/admin/partials/neulee-admin-display.php:18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/neulee/includes/class-neulee-activator.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/neulee/admin/partials/neulee-admin-solution.php:18
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/neulee/includes/class-neulee-activator.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: script, style

neulee/neulee.php 92% from 13 tests

"Neulee API Wordpress plugin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 383 characters long)

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
Everything looks great! No dangerous files found in this plugin1,276 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP123525731,178
CSS111495
JavaScript12273

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.29
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
12 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/download.png1.20KB1.00KB▼ 16.98%
admin/css/images/print.png2.47KB1.66KB▼ 32.70%
assets/icon-128x128.png6.93KB3.29KB▼ 52.59%
admin/css/images/error.png2.15KB1.67KB▼ 22.25%
admin/css/images/info.png2.17KB1.76KB▼ 18.66%