68% nexus

Code Review | NEXUS

WordPress plugin NEXUS scored 68% from 54 tests.

About plugin

  • Plugin page: nexus
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.9.2
  • First release: Feb 24, 2017
  • Latest release: Mar 30, 2017
  • Number of updates: 28
  • Update frequency: every 2.6 days
  • Top authors: jamesparkninja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 850 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: ▲2.31MB] [CPU: ▼278.60ms] Passed 4 tests

Analyzing server-side resources used by NEXUS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.77 ▲2.6568.22 ▲32.24
Dashboard /wp-admin5.71 ▲2.3149.57 ▲15.46
Posts /wp-admin/edit.php6.00 ▲2.3656.81 ▲18.84
Add New Post /wp-admin/post-new.php9.22 ▲2.25122.84 ▼1,153.42
Media Library /wp-admin/upload.php5.63 ▲2.3340.47 ▲4.74
Rejected /wp-admin/edit.php?post_type=nexus_rejected5.7141.96
Complete /wp-admin/edit.php?post_type=nexus_complete5.7146.11
Freemius Debug [v.1.2.1.5] /wp-admin/admin.php?page=freemius5.7137.80

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 293 new files
Database: no new tables, 12 new options
New WordPress options
nexus_request_settings
nexus_mode_settings
nexus_time_tracker_settings
nexus_plugin_url
nexus_main_settings
fs_accounts
fs_api_cache
nexus_plugin_dir
nexus_theme_settings
fs_active_plugins
...

Browser metrics Passed 4 tests

A check of browser resources used by NEXUS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,080 ▲33817.49 ▲1.716.03 ▼0.842.28 ▲0.08
Dashboard /wp-admin3,197 ▲3368.36 ▲2.19145.75 ▲3.18263.31 ▲96.65
Posts /wp-admin/edit.php3,030 ▲3365.33 ▲2.0980.09 ▲13.78195.50 ▲45.49
Add New Post /wp-admin/post-new.php1,742 ▼1820.37 ▼2.31398.29 ▼19.73177.25 ▼31.79
Media Library /wp-admin/upload.php1,808 ▲1135.90 ▲0.42113.25 ▼38.43280.87 ▲38.51
Rejected /wp-admin/edit.php?post_type=nexus_rejected1,6835.4591.82160.81
Complete /wp-admin/edit.php?post_type=nexus_complete1,7035.3382.33207.38
Freemius Debug [v.1.2.1.5] /wp-admin/admin.php?page=freemius1,7004.8378.75162.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/nexus/nexus_pre_functions.php+905
    Invalid argument supplied for foreach()
  • Zombie WordPress options were found after uninstall: 12 options
    • nexus_mode_list
    • nexus_theme_settings
    • nexus_plugin_url
    • nexus_time_tracker_settings
    • fs_accounts
    • fs_active_plugins
    • fs_api_cache
    • nexus_main_settings
    • nexus_mode_settings
    • nexus_request_settings
    • ...

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 0% 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
Please fix the following items
  • 34× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/client/remind_signoff.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/design/completed.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/client/begun.php
    • > /wp-content/plugins/nexus/css/nexus-variable-css.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/design/begun.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/design/newrequest.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/client/reject.php
    • > /wp-content/plugins/nexus/inc/nexus_api/panels/filter.php
    • > /wp-content/plugins/nexus/inc/nexus_api/scripts/datepicker.php
    • > /wp-content/plugins/nexus/inc/nexus_classes/emails/header.php
  • 258× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: cfname in wp-content/plugins/nexus/inc/nexus_classes/emails/design/feedbackfromclient.php on line 1
    • > PHP Notice
      Undefined variable: website_title in wp-content/plugins/nexus/inc/nexus_classes/emails/client/mockup.php on line 16
    • > PHP Notice
      Undefined variable: projectID in wp-content/plugins/nexus/inc/nexus_classes/emails/design/updated.php on line 1
    • > PHP Notice
      Undefined variable: designer in wp-content/plugins/nexus/inc/nexus_classes/emails/design/feedbackfromclient.php on line 3
    • > PHP Notice
      Undefined variable: website_url in wp-content/plugins/nexus/inc/nexus_classes/emails/header.php on line 40
    • > PHP Notice
      Undefined variable: website_title in wp-content/plugins/nexus/inc/nexus_classes/emails/client/feedbacktoclient.php on line 16
    • > PHP Notice
      Undefined variable: oldID in wp-content/plugins/nexus/inc/nexus_classes/emails/client/reject.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nexus_plugin_inc() in wp-content/plugins/nexus/inc/nexus_api/forms/login_form.php:2
    • > PHP Notice
      Undefined variable: cfname in wp-content/plugins/nexus/inc/nexus_classes/emails/design/mockup.php on line 3
    • > PHP Notice
      Undefined variable: designer in wp-content/plugins/nexus/inc/nexus_classes/emails/design/mockup.php on line 6

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

nexus/nexus.php 92% from 13 tests

"NEXUS" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin66,591 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP1725,56811,53627,066
CSS263,23958816,973
SVG81011,685
JavaScript181,1287385,316
PO File41,4221,4393,651
Sass15267821,636
Markdown1610192
Ruby11040
JSON10032

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,019)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity49.62
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods855
▷ Static methods10712.51%
▷ Public methods64675.56%
▷ Protected methods475.50%
▷ Private methods16218.95%
Functions166
▷ Named functions16599.40%
▷ Anonymous functions10.60%
Constants118
▷ Global constants7664.41%
▷ Class constants4235.59%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-sidebar.png4.72KB2.88KB▼ 38.96%
images/arrowDown.png0.44KB0.39KB▼ 12.17%
js/images/whitefade.png5.35KB8.97KB0.00%
images/logo-small.png1.64KB1.62KB▼ 1.31%
images/beer.png18.83KB10.93KB▼ 41.95%