84% code-repository

Code Review | Code Repository

WordPress plugin Code Repository scored84%from 54 tests.

About plugin

  • Plugin page: code-repository
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Jun 9, 2014
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: jamesona (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲3.12ms] Passed 4 tests

Server-side resources used by Code Repository
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.34 ▲1.21
Dashboard /wp-admin3.40 ▲0.0951.28 ▲1.54
Posts /wp-admin/edit.php3.50 ▲0.1454.29 ▲4.75
Add New Post /wp-admin/post-new.php5.98 ▲0.0997.58 ▲7.27
Media Library /wp-admin/upload.php3.32 ▲0.0939.95 ▲4.96
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=script3.3139.00
All Scripts /wp-admin/edit.php?post_type=script3.3542.36
Add New /wp-admin/post-new.php?post_type=script3.4353.38
Script Types /wp-admin/edit-tags.php?taxonomy=script_category&post_type=script3.3140.31

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
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Code Repository: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.21 ▼1.101.54 ▼0.1941.62 ▼3.37
Dashboard /wp-admin2,238 ▲504.87 ▼1.00109.52 ▼7.6343.07 ▼3.36
Posts /wp-admin/edit.php2,124 ▲532.04 ▲0.0040.56 ▲3.9834.63 ▼1.53
Add New Post /wp-admin/post-new.php1,567 ▲3323.55 ▲0.32661.52 ▼41.8260.30 ▲6.12
Media Library /wp-admin/upload.php1,420 ▲294.18 ▼0.00101.28 ▲1.7642.83 ▼0.37
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=script1,3392.1427.3329.56
All Scripts /wp-admin/edit.php?post_type=script1,1392.0030.9131.53
Add New /wp-admin/post-new.php?post_type=script2,3314.3881.9447.93
Script Types /wp-admin/edit-tags.php?taxonomy=script_category&post_type=script1,2942.1326.8827.51

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_post() in wp-content/plugins/code-repository/bare-script.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/code-repository/code-repo.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === code-repository === )
The official readme.txt might help

code-repository/code-repo.php 92% from 13 tests

The primary PHP file in "Code Repository" version 0.2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("code-repository.php" instead of "code-repo.php")

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
No dangerous file extensions were detected124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21740124

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions7
▷ Named functions7100.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