84% ns-mistercorporate

Code Review | NS Mistercorporate

WordPress plugin NS Mistercorporate scored84%from 54 tests.

About plugin

  • Plugin page: ns-mistercorporate
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9
  • WordPress version: 6.3.1
  • First release: Nov 7, 2017
  • Latest release: Feb 9, 2022
  • Number of updates: 26
  • Update frequency: every 59.8 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,679 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
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼5.34ms] Passed 4 tests

This is a short check of server-side resources used by NS Mistercorporate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2142.48 ▲4.93
Dashboard /wp-admin3.52 ▲0.2251.20 ▼0.23
Posts /wp-admin/edit.php3.64 ▲0.2849.49 ▼4.11
Add New Post /wp-admin/post-new.php6.11 ▲0.2188.82 ▼17.43
Media Library /wp-admin/upload.php3.45 ▲0.2139.86 ▲0.43
/wp-admin/admin.php?page=plugineye2193.4131.21

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_mistercorporate_contact_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for NS Mistercorporate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▼0.311.93 ▼0.0843.92 ▲1.51
Dashboard /wp-admin2,194 ▲145.58 ▼0.0484.14 ▼3.4742.80 ▼1.12
Posts /wp-admin/edit.php2,102 ▲22.01 ▲0.0136.32 ▼6.5835.66 ▼2.08
Add New Post /wp-admin/post-new.php1,552 ▲2618.12 ▲0.57628.76 ▼37.5853.92 ▼1.12
Media Library /wp-admin/upload.php1,402 ▼14.27 ▲0.0196.09 ▼19.0243.13 ▼5.96
/wp-admin/admin.php?page=plugineye2198722.0631.4726.85

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_mistercorporate_contact_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ns-mistercorporate/template/ns-mistercorporate-template-home.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-mistercorporate/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Settings NS Mistercorporate.), #2 (View all new features.), #3 (Example Newsletter section), #4 (Example Price section), #5 (Example Map section)
You can take inspiration from this readme.txt

ns-mistercorporate/ns-mistercorporate.php Passed 13 tests

The primary PHP file in "NS Mistercorporate" version 1.1.3 is used by WordPress to initiate all plugin functionality
57 characters long description:
This plugin add theme options to Mistercorporate template

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,980 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP82362231,797
CSS2710155
JavaScript14028

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods939.13%
▷ Protected methods00.00%
▷ Private methods1460.87%
Functions13
▷ Named functions646.15%
▷ Anonymous functions753.85%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 1.80MB with 1.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/map-marker.png1.42KB1.17KB▼ 17.42%
screenshot-3.png384.58KB122.15KB▼ 68.24%
screenshot-5.png329.65KB107.35KB▼ 67.44%
screenshot-2.png784.19KB282.62KB▼ 63.96%
screenshot-1.png181.35KB52.66KB▼ 70.96%