84% wp-mercurial

Code Review | WP Mercurial

WordPress plugin WP Mercurial scored84%from 54 tests.

About plugin

  • Plugin page: wp-mercurial
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2012
  • Latest release: Nov 18, 2012
  • Number of updates: 4
  • Update frequency: every 6.0 days
  • Top authors: invisnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,070 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.88ms] Passed 4 tests

Server-side resources used by WP Mercurial
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.12 ▲1.40
Dashboard /wp-admin3.28 ▼0.0745.97 ▼19.66
Posts /wp-admin/edit.php3.38 ▲0.0247.98 ▼1.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.72 ▼19.73
Media Library /wp-admin/upload.php3.25 ▲0.0237.84 ▲3.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Mercurial
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12014.17 ▲0.241.63 ▼0.1041.48 ▼2.27
Dashboard /wp-admin2,287 ▲1075.63 ▲0.0293.80 ▲5.5942.05 ▲0.22
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0235.00 ▼0.1832.60 ▼1.12
Add New Post /wp-admin/post-new.php1,531 ▲322.99 ▼0.20682.92 ▲43.0553.56 ▲8.69
Media Library /wp-admin/upload.php1,394 ▼64.10 ▼0.04110.41 ▲14.4845.93 ▼1.17

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-mercurial/wp-mercurial.php:29

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: mercurial

wp-mercurial/wp-mercurial.php Passed 13 tests

The main PHP script in "WP Mercurial" version 1.1 is automatically included on every request by WordPress
110 characters long description:
Basic Mercurial funtionality from the dashboard. Automatically commit after updating core, plugins, or themes.

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
There were no executable files found in this plugin123 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11421110
CSS11013

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.39
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%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.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
No PNG files were detected