84% sm-post-duplicator

Code Review | sm post duplicator

WordPress plugin sm post duplicator scored84%from 54 tests.

About plugin

  • Plugin page: sm-post-duplicator
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Jan 9, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mehtashail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /630 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
Installer ran successfully

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

This is a short check of server-side resources used by sm post duplicator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.34 ▼3.37
Dashboard /wp-admin3.33 ▲0.0349.04 ▼4.87
Posts /wp-admin/edit.php3.38 ▲0.0246.06 ▼0.48
Add New Post /wp-admin/post-new.php5.91 ▲0.02104.82 ▲6.60
Media Library /wp-admin/upload.php3.25 ▲0.0235.43 ▼2.85

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for sm post duplicator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.64 ▼0.761.86 ▲0.0440.96 ▲0.44
Dashboard /wp-admin2,206 ▲184.82 ▼1.01109.82 ▼6.3238.82 ▼6.97
Posts /wp-admin/edit.php2,090 ▼22.00 ▼0.0534.11 ▼4.6530.77 ▼4.49
Add New Post /wp-admin/post-new.php1,535 ▲1823.14 ▲5.37673.17 ▲3.4255.20 ▼7.00
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0998.42 ▼5.2841.69 ▼1.58

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sm-post-duplicator/sm-post-duplicator.php:33

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: duplicate post, duplicator, post-duplicator, duplication

sm-post-duplicator/sm-post-duplicator.php 92% from 13 tests

"sm post duplicator" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1211688

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin