10% nashr-seo

Code Review | NASHR SEO

WordPress plugin NASHR SEO scored 10% from 54 tests.

About plugin

  • Plugin page: nashr-seo
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Oct 1, 2014
  • Latest release: Apr 25, 2017
  • Number of updates: 38
  • Update frequency: every 24.7 days
  • Top authors: mnbaaco (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 7,649 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/nashr-seo/includes/mnbaa_functions.php+233
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.71ms] Passed 4 tests

Analyzing server-side resources used by NASHR SEO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.49 ▼34.36
Dashboard /wp-admin2.07 ▼1.235.33 ▼46.07
Posts /wp-admin/edit.php2.07 ▼1.284.63 ▼44.72
Add New Post /wp-admin/post-new.php2.07 ▼3.814.70 ▼89.68
Media Library /wp-admin/upload.php2.07 ▼1.166.11 ▼27.63
Archive Page Setting /wp-admin/admin.php?page=mnbaa_archive_page_seo2.075.81
Nashr SEO /wp-admin/admin.php?page=mnbaa_seo2.076.23
Social Media /wp-admin/admin.php?page=mnbaa_social_seo2.075.22
Index Page Setting /wp-admin/admin.php?page=mnbaa_index_page_seo2.077.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
mnbaa_seo__archive
theysaidso_admin_options
widget_recent-comments
db_upgraded
mnbaa_seo_screens
widget_recent-posts
mnbaa_seo_private_update

Browser metrics Passed 4 tests

A check of browser resources used by NASHR SEO
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲30814.50 ▼0.1810.53 ▲8.3638.16 ▼11.14
Dashboard /wp-admin2,257 ▲1025.18 ▼0.58106.06 ▲2.4882.84 ▲43.24
Posts /wp-admin/edit.php2,163 ▲742.59 ▲0.6235.25 ▼1.9837.02 ▲2.72
Add New Post /wp-admin/post-new.php6,920 ▲5,37820.33 ▲2.12857.98 ▲240.5440.61 ▼18.10
Media Library /wp-admin/upload.php1,457 ▲664.58 ▲0.3693.44 ▼9.2289.45 ▲45.65
Archive Page Setting /wp-admin/admin.php?page=mnbaa_archive_page_seo1,3112.4337.4134.04
Nashr SEO /wp-admin/admin.php?page=mnbaa_seo9262.1728.3625.99
Social Media /wp-admin/admin.php?page=mnbaa_social_seo1,0432.2930.9825.44
Index Page Setting /wp-admin/admin.php?page=mnbaa_index_page_seo1,2842.5738.6535.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 9 options
    • mnbaa_seo__archive
    • db_upgraded
    • mnbaa_seo_private_update
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • mnbaa_seo_screens

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the limit handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the selectall handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the mytabs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the nashr-autocomplete handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-nashr handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-nashr handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > Deprecated in wp-content/plugins/nashr-seo/includes/mnbaa_functions.php+233
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
    • > GET request to /wp-admin/admin.php?page=mnbaa_archive_page_seo
    • > Notice in wp-content/plugins/nashr-seo/includes/mnbaa_functions.php+161
    Trying to get property 'mnbaa_seo_title' of non-object
    • > GET request to /wp-admin/admin.php?page=mnbaa_archive_page_seo
    • > Notice in wp-content/plugins/nashr-seo/includes/mnbaa_functions.php+164
    Trying to get property 'mnbaa_seo_description' of non-object
    • > GET request to /wp-admin/admin.php?page=mnbaa_archive_page_seo
    • > Notice in wp-content/plugins/nashr-seo/includes/wp_functions.php+1205
    Undefined index: mnbaa_seo_archive
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > Notice in wp-content/plugins/nashr-seo/includes/wp_functions.php+900
    Undefined variable: prefix

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nashr-seo/includes/arrays.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nashr-seo/includes/general_setting.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/nashr-seo/NashrSEO.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nashr-seo/views/license_page.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mnbaa_index_page_seo
    • > Network (severe)
    wp-content/plugins/nashr-seo/js/jquery-ui.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not 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
These attributes need to be fixed:
  • Tags: There are too many tags (23 tag instead of maximum 10)
You can look at the official readme.txt

nashr-seo/NashrSEO.php 92% from 13 tests

The main file in "NASHR SEO" v. 1.6.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("nashr-seo.php" instead of "NashrSEO.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,367 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP72891001,725
CSS2234241
PO File197134219
JavaScript74621182

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png9.64KB6.50KB▼ 32.60%
screenshot-2.png42.36KB22.99KB▼ 45.74%
images/seo-icon.png3.19KB0.77KB▼ 75.83%
screenshot-5.png24.35KB16.11KB▼ 33.85%
screenshot-4.png19.95KB14.30KB▼ 28.33%