78% netgsm

Code Review | Netgsm

WordPress plugin Netgsm scored78%from 54 tests.

About plugin

  • Plugin page: netgsm
  • Plugin version: 2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: Oct 2, 2023
  • Number of updates: 164
  • Update frequency: every 12.5 days
  • Top authors: netgsm (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /23,638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.50ms] Passed 4 tests

This is a short check of server-side resources used by Netgsm
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.98 ▼1.20
Dashboard /wp-admin3.40 ▲0.1051.03 ▼0.56
Posts /wp-admin/edit.php3.44 ▲0.0951.16 ▼1.44
Add New Post /wp-admin/post-new.php5.99 ▲0.1097.38 ▲2.90
Media Library /wp-admin/upload.php3.33 ▲0.1038.62 ▲1.21

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 94 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Netgsm
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.34 ▼1.041.67 ▼0.0543.04 ▲1.10
Dashboard /wp-admin2,208 ▲345.02 ▼0.57105.88 ▲15.00100.41 ▲59.99
Posts /wp-admin/edit.php2,128 ▲312.49 ▲0.4940.81 ▲0.2837.16 ▼0.28
Add New Post /wp-admin/post-new.php1,705 ▲16022.89 ▼0.30666.30 ▲62.6233.37 ▼35.50
Media Library /wp-admin/upload.php1,422 ▲284.50 ▲0.33103.19 ▲4.0881.86 ▲35.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/netgsm/pages/voip.php
    • > /wp-content/plugins/netgsm/pages/settings.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/netgsm/pages/settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/netgsm/pages/asistan.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/netgsm/pages/contactform7.php:11
    • > PHP Notice
      Trying to get property 'roles' of non-object in wp-content/plugins/netgsm/pages/settings.php on line 4
    • > PHP Notice
      Undefined variable: session in wp-content/plugins/netgsm/pages/settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/netgsm/pages/iys.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

netgsm/index.php 85% from 13 tests

Analyzing the main PHP file in "Netgsm" version 2.8
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("netgsm.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 599 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected37,679 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
SVG70012,513
CSS102,3833311,168
PHP105431585,854
JavaScript87616134,562
Sass1434341,768
LESS1434441,758
XML30056

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity52.67
▷ Minimum class complexity14.00
▷ Maximum class complexity116.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods4692.00%
▷ Protected methods00.00%
▷ Private methods48.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/image/netgsm.png1.19KB0.90KB▼ 24.82%
lib/image/netasistan-ust-logo.png2.12KB1.17KB▼ 44.59%
lib/image/logo.png2.86KB2.97KB0.00%