10% nuwire-paper-boy

Code Review | NUWire Paper Boy

WordPress plugin NUWire Paper Boy scored10%from 54 tests.

About plugin

  • Plugin page: nuwire-paper-boy
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2014
  • Latest release: Mar 24, 2014
  • Number of updates: 17
  • Update frequency: every 0.1 days
  • Top authors: psiemens (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /653 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/nuwire-paper-boy/nuw-paper-boy.php+11
    Use of undefined constant NUWIRE_PATH - assumed 'NUWIRE_PATH' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.87MB] [CPU: ▼63.49ms] Passed 4 tests

This is a short check of server-side resources used by NUWire Paper Boy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.60 ▼47.79
Dashboard /wp-admin2.15 ▼1.205.69 ▼59.66
Posts /wp-admin/edit.php2.15 ▼1.217.20 ▼47.92
Add New Post /wp-admin/post-new.php2.15 ▼3.747.68 ▼98.60
Media Library /wp-admin/upload.php2.15 ▼1.087.49 ▼32.47
NUW Account /wp-admin/options-general.php?page=nuw-account2.157.98

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

A short overview of filesystem and database impact
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
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for NUWire Paper Boy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.042.06 ▼0.2143.56 ▼1.47
Dashboard /wp-admin2,202 ▲225.62 ▼0.0386.88 ▼2.9539.15 ▼1.50
Posts /wp-admin/edit.php2,114 ▲111.98 ▼0.0139.11 ▼1.1936.94 ▼1.14
Add New Post /wp-admin/post-new.php6,230 ▲4,70426.06 ▲3.12931.48 ▲218.2873.82 ▲14.61
Media Library /wp-admin/upload.php1,404 ▲44.12 ▼0.1397.10 ▼17.5645.16 ▲0.40
NUW Account /wp-admin/options-general.php?page=nuw-account8012.0023.0827.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/nuwire-paper-boy/nuw-paper-boy.php+11
    Use of undefined constant NUWIRE_PATH - assumed 'NUWIRE_PATH' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=nuw-account
    • > Warning in wp-content/plugins/nuwire-paper-boy/nuw-paper-boy.php+11
    Use of undefined constant NUWIRE_PATH - assumed 'NUWIRE_PATH' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=nuw-account
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=nuw-account
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant NUWIRE_PATH - assumed 'NUWIRE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nuwire-paper-boy/nuw-paper-boy.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nuwire-paper-boy/nuw-paper-boy.php:375

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === nuwire-paper-boy === )
You can look at the official readme.txt

nuwire-paper-boy/nuw-paper-boy.php 92% from 13 tests

The principal PHP file in "NUWire Paper Boy" v. 0.1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nuwire-paper-boy.php" instead of "nuw-paper-boy.php")

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 plugin270 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19017270

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity8.00
▷ Maximum class complexity24.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin