84% simple-contacts-manager

Code Review | Simple Contacts Manager

WordPress plugin Simple Contacts Manager scored84%from 54 tests.

About plugin

  • Plugin page: simple-contacts-m...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: May 30, 2015
  • Latest release: Jul 29, 2015
  • Number of updates: 15
  • Update frequency: every 4.0 days
  • Top authors: raeven (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.25ms] Passed 4 tests

A check of server-side resources used by Simple Contacts Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0651.69 ▲10.92
Dashboard /wp-admin3.37 ▲0.0247.65 ▼13.33
Posts /wp-admin/edit.php3.49 ▲0.1347.18 ▲1.69
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.09 ▲4.96
Media Library /wp-admin/upload.php3.30 ▲0.0635.77 ▼2.31
Settings /wp-admin/admin.php?page=contacts-manager-settings3.3032.32
Contacts Manager /wp-admin/admin.php?page=contacts-manager3.3032.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Contacts Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.71 ▼0.701.73 ▲0.0037.61 ▼2.78
Dashboard /wp-admin2,236 ▲484.91 ▲0.0396.75 ▼1.4684.75 ▲42.39
Posts /wp-admin/edit.php2,122 ▲332.00 ▼0.0437.93 ▲1.9835.11 ▲0.73
Add New Post /wp-admin/post-new.php1,552 ▲1023.10 ▲4.93658.64 ▲15.4253.00 ▲2.57
Media Library /wp-admin/upload.php1,412 ▲244.25 ▲0.04103.62 ▼4.8789.06 ▲43.15
Settings /wp-admin/admin.php?page=contacts-manager-settings9191.7325.6730.68
Contacts Manager /wp-admin/admin.php?page=contacts-manager9271.8425.5027.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-contacts-manager/views/contacts-manager.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-contacts-manager/views/google_analytics_code.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-contacts-manager/views/contacts-manager-settings.php:12
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simple-contacts-manager/simple-contacts-manager.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-contacts-manager/simple-contacts-manager.php:199
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-contacts-manager/views/edit_group.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-contacts-manager/views/main-container.php:15
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/simple-contacts-manager/simple-contacts-manager.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-contacts-manager/simple-contacts-manager.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-contacts-manager === )
The official readme.txt is a good inspiration

simple-contacts-manager/simple-contacts-manager.php 92% from 13 tests

The main PHP script in "Simple Contacts Manager" version 1.3.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 335 characters long)

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 plugin856 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP610817685
JavaScript120098
CSS12073

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1463.64%
▷ Protected methods00.00%
▷ Private methods836.36%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/contacts.png14.98KB0.39KB▼ 97.41%