84% nm-visitors

Code Review | WordPress Visitors

WordPress plugin WordPress Visitors scored84%from 54 tests.

About plugin

  • Plugin page: nm-visitors
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.5
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Jun 27, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: nitinmaurya12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by WordPress Visitors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.04223.94 ▲181.57
Dashboard /wp-admin3.33 ▼0.0144.14 ▼17.86
Posts /wp-admin/edit.php3.38 ▲0.0347.16 ▲1.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.27 ▼3.70
Media Library /wp-admin/upload.php3.25 ▲0.0339.84 ▲6.38

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_nmvisitors
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Visitors
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.75 ▼0.501.73 ▲0.0340.87 ▼3.74
Dashboard /wp-admin2,218 ▲304.85 ▼0.24107.36 ▼9.3742.60 ▼4.17
Posts /wp-admin/edit.php2,101 ▲92.05 ▲0.0539.24 ▼13.1937.28 ▼11.05
Add New Post /wp-admin/post-new.php1,542 ▲2321.00 ▼2.26661.83 ▼21.0957.97 ▲3.53
Media Library /wp-admin/upload.php1,394 ▲34.20 ▼0.02100.16 ▲5.8045.48 ▲2.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nm-visitors/visitors_list.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-screen.php): failed to open stream: No such file or directory in wp-content/plugins/nm-visitors/nm-visitors.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/nm-visitors/visitors_list.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nm-visitors/nm-visitors.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/nm-visitors/nm-visitors.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/nm-visitors/visitors_list.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (WordPress NM Visitor)
You can look at the official readme.txt

nm-visitors/nm-visitors.php Passed 13 tests

The primary PHP file in "WordPress Visitors" version 1.0 is used by WordPress to initiate all plugin functionality
22 characters long description:
To fetch the visitors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23588200

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity11.00
▷ Maximum class complexity13.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.59KB33.65KB▼ 36.01%