68% acosmin-north-extensions

Code Review | North Extensions

WordPress plugin North Extensions scored 68% from 54 tests.

About plugin

  • Plugin page: acosmin-north-ext...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 5.9.2
  • First release: Jun 24, 2017
  • Latest release: Jun 24, 2017
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: acosmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,091 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼2.17MB] [CPU: ▼341.87ms] Passed 4 tests

A check of server-side resources used by North Extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.318.40 ▼39.34
Dashboard /wp-admin2.22 ▼1.188.81 ▼32.27
Posts /wp-admin/edit.php2.22 ▼1.429.96 ▼28.75
Add New Post /wp-admin/post-new.php2.22 ▼4.758.18 ▼1,267.10
Media Library /wp-admin/upload.php2.22 ▼1.077.87 ▼23.70
Instagram Settings /wp-admin/options-general.php?page=northe-instagram-settings2.227.92
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php2.4510.75

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 4 new options
New WordPress options
widget_north-w-das
widget_north-wid-instagram
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

North Extensions: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲7215.86 ▼0.166.01 ▲0.142.23 ▼0.47
Dashboard /wp-admin2,904 ▲436.12 ▼0.06122.46 ▼7.83155.45 ▼14.38
Posts /wp-admin/edit.php2,706 ▲123.24 ▼0.1363.07 ▲0.99140.32 ▼0.37
Add New Post /wp-admin/post-new.php1,725 ▲8620.27 ▲0.77400.46 ▲18.21221.72 ▲65.83
Media Library /wp-admin/upload.php1,713 ▲155.52 ▲0.03146.91 ▲1.46184.55 ▼11.77
Instagram Settings /wp-admin/options-general.php?page=northe-instagram-settings1,0502.4554.21133.51
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,57819.60490.06153.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/acosmin-north-extensions/widgets/instagram/instagram-class.php+58
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 4 options
    • widget_north-wid-instagram
    • widget_north-w-das
    • widget_recent-comments
    • 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)
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/acosmin-north-extensions/widgets/instagram/instagram-class.php+58
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/acosmin-north-extensions/widgets/base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/modules/title-design/init.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Northe_Widgets_Base' not found in wp-content/plugins/acosmin-north-extensions/sections/ads/ads.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/settings-pages/instagram.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/widgets/ads/ads-tmpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/acosmin-north-extensions/sections/category/category.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/inc/enqueue-backend.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/widgets/instagram/instagram-tmpl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Northe_Widgets_Base' not found in wp-content/plugins/acosmin-north-extensions/widgets/instagram/instagram.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acosmin-north-extensions/sections/ads/ads-tmpl.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: No tags were detected
You can take inspiration from this readme.txt

acosmin-north-extensions/acosmin-north-extensions.php Passed 13 tests

The primary PHP file in "North Extensions" version 1.0.0 is used by WordPress to initiate all plugin functionality
116 characters long description:
Adds front page sections (Instagram, Ads), a post title design option and other extensions to North WordPress theme.

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
Good job! No executable or dangerous file extensions detected1,648 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP214448931,603
JavaScript2154242
CSS1183

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.71
▷ Minimum class complexity6.00
▷ Maximum class complexity35.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods38.33%
▷ Public methods3391.67%
▷ Protected methods38.33%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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 are no PNG files in this plugin