79% northstar

Code Review | NorthStar

WordPress plugin NorthStar scored79%from 54 tests.

About plugin

  • Plugin page: northstar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2023
  • Latest release: Mar 15, 2023
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: markpraschan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by NorthStar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.77 ▲3.69
Dashboard /wp-admin3.32 ▲0.0249.44 ▼3.26
Posts /wp-admin/edit.php3.37 ▲0.0248.36 ▼5.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.09 ▼6.92
Media Library /wp-admin/upload.php3.25 ▲0.0237.40 ▼2.85
NorthStar /wp-admin/options-general.php?page=northstar3.2134.01

Server storage [IO: ▲0.01MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for NorthStar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2613.23 ▼1.051.64 ▼0.6540.84 ▲2.51
Dashboard /wp-admin2,221 ▲415.76 ▲0.1094.97 ▼7.9337.78 ▼4.17
Posts /wp-admin/edit.php2,128 ▲282.27 ▲0.2841.34 ▼0.6634.01 ▼4.34
Add New Post /wp-admin/post-new.php1,543 ▲1523.29 ▲0.17661.41 ▼25.8036.14 ▼26.65
Media Library /wp-admin/upload.php1,420 ▲174.39 ▲0.26103.03 ▼10.9547.52 ▼2.57
NorthStar /wp-admin/options-general.php?page=northstar8671.9326.7225.06

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/northstar/northstar.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=northstar
    • > Network (severe)
    wp-content/plugins/northstar/northstar-color-picker.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: northstar, adminbar, motivation, settings

northstar/northstar.php Passed 13 tests

"NorthStar" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
A plugin to display your "North Star" in the admin bar. What are you working toward?

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin86 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181586

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
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%
Functions11
▷ Named functions11100.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
No PNG files were detected