89% ams-post-and-page-duplicator

Code Review | AMS Post And Page Duplicator

WordPress plugin AMS Post And Page Duplicator scored89%from 54 tests.

About plugin

  • Plugin page: ams-post-and-page...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Jan 23, 2022
  • Number of updates: 13
  • Update frequency: every 150.5 days
  • Top authors: manojsv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /7,057 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.03MB] [CPU: ▼0.72ms] Passed 4 tests

A check of server-side resources used by AMS Post And Page Duplicator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.88 ▼1.71
Dashboard /wp-admin3.34 ▲0.0450.01 ▼2.83
Posts /wp-admin/edit.php3.39 ▲0.0450.67 ▼1.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0499.37 ▲4.21
Media Library /wp-admin/upload.php3.26 ▲0.0441.90 ▲3.21

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AMS Post And Page Duplicator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.80 ▲0.421.77 ▲0.0145.98 ▲1.05
Dashboard /wp-admin2,224 ▲214.82 ▼0.06102.31 ▼8.9536.05 ▼4.58
Posts /wp-admin/edit.php2,111 ▲112.03 ▲0.0434.68 ▼4.7333.03 ▼0.27
Add New Post /wp-admin/post-new.php1,550 ▲523.19 ▼0.05640.11 ▼81.5270.72 ▲11.48
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.00113.65 ▲7.7347.44 ▼0.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

ams-post-and-page-duplicator/ams-post-and-page-duplictor.php 85% from 13 tests

The primary PHP file in "AMS Post And Page Duplicator" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ams-post-and-page-duplicator.php" instead of "ams-post-and-page-duplictor.php")

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
Success! There were no dangerous files found in this plugin176 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46053176

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity11.67
▷ Minimum class complexity10.00
▷ Maximum class complexity15.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin