84% copy-move-posts

Code Review | Copy Move Posts

WordPress plugin Copy Move Posts scored84%from 54 tests.

About plugin

  • Plugin page: copy-move-posts
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: May 15, 2022
  • Number of updates: 20
  • Update frequency: every 108.2 days
  • Top authors: ujjavaljani (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active /10,215 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Copy Move Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.95 ▼3.20
Dashboard /wp-admin3.31 ▲0.0148.46 ▼5.41
Posts /wp-admin/edit.php3.36 ▲0.0048.58 ▼3.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.42 ▼20.14
Media Library /wp-admin/upload.php3.23 ▲0.0039.18 ▼0.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Copy Move Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.32 ▼1.051.86 ▼0.1544.69 ▼0.26
Dashboard /wp-admin2,218 ▲305.90 ▲1.01103.11 ▼14.0442.54 ▼0.04
Posts /wp-admin/edit.php2,098 ▲92.00 ▲0.0135.55 ▼2.4535.24 ▲0.05
Add New Post /wp-admin/post-new.php1,544 ▲2523.57 ▲0.35652.53 ▲20.9860.12 ▲12.94
Media Library /wp-admin/upload.php1,403 ▲124.19 ▲0.02105.99 ▲5.1646.20 ▲1.20

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/copy-move-posts/copy-move-posts-admin-page.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/copy-move-posts/copy-move-posts-function.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

copy-move-posts/copy-move-posts-function.php 92% from 13 tests

The main PHP file in "Copy Move Posts" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("copy-move-posts.php" instead of "copy-move-posts-function.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin170 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21119170

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin